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

How to solve .vue file garbled characters

藏色散人
藏色散人Original
2020-12-24 09:06:547271browse

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.

How to solve .vue file garbled characters

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"

How to solve .vue file garbled characters

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn