Preferences->Settings", then search for "encode" and set "utf-8"."/> Preferences->Settings", then search for "encode" and set "utf-8".">
Home > Article > Web Front-end > How to solve .vue file garbled characters
Solution to garbled vue files: 1. Set to use utf8 format to open and save files; 2. Open "File->Preferences->Settings" in sequence, then search for "encode" and set "utf -8" is enough.
The operating environment of this tutorial: windows7 system, vue2.0&&vscode1.36 version, Dell G3 computer.
Recommended related articles: vue.js
In vs code, create a new .vue file, enter Chinese in the template, close and then open, garbled characters appear.
The reason is that it is saved in utf-8 format and opened in windows 1252 encoding.
Solution:
1) Set to use utf-8 format to open and save files
2) Disable tools to automatically guess file encoding
File-》 Preferences->Settings, then search for "encode"
For more programming-related knowledge, please visit: Getting Started with Programming! !
The above is the detailed content of How to solve .vue file garbled characters. For more information, please follow other related articles on the PHP Chinese website!