Home > Development Tools > VSCode > body text

How to configure vscode to automatically identify file encoding? [Detailed picture and text]

青灯夜游
Release: 2022-06-14 18:15:35
forward
3733 people have browsed it

vscodeWhat should I do if I open a file with garbled characters? This article will introduce to you the method to solve the garbled code - configure vscode so that it can automatically identify the file encoding. I hope it will be helpful to you!

How to configure vscode to automatically identify file encoding? [Detailed picture and text]

Our vscode open files are utf-8 encoded by default. When we open other encoding files (such as gb2312), garbled characters will occur. [Recommended learning: "vscode introductory tutorial"]

How to configure vscode to automatically identify file encoding? [Detailed picture and text]

At this time we hope to see the normal code, click UTF-8# in the lower right corner

How to configure vscode to automatically identify file encoding? [Detailed picture and text]

## A window will pop up above, we click [Reopen with encoding] and it will display normally


How to configure vscode to automatically identify file encoding? [Detailed picture and text]

How to configure vscode to automatically identify file encoding? [Detailed picture and text] But the problem is not solved. When we open this file next time, it will still be garbled. This is because our editor does not automatically recognize the encoding of the file, and it will still use UTF-8 to open it next time.

In fact, vscode has its own recognition function and does not require any plug-ins. The method is as follows:

Open in sequence, File-"Preferences"Settings


How to configure vscode to automatically identify file encoding? [Detailed picture and text]

Then the setting interface will change. Search for [files.autoGuessEncoding] in the search box, and the setting item will appear. Just check it.


How to configure vscode to automatically identify file encoding? [Detailed picture and text]

For more knowledge about VSCode, please visit:

vscode tutorial!

The above is the detailed content of How to configure vscode to automatically identify file encoding? [Detailed picture and text]. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template