2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
VSCode has a default character set. If you modify it directly, it will modify the character set of the entire VSCode tool. If different projects use different character sets, you cannot modify this default setting. Instead, you need to modify it for each project.
Modification method:
Use shift+ctrl+p to enter the settings menu page and click "Open workspace settings". Note that "Open workspace settings (JSON)" is not selected here. The latter will be opened in json format. For convenience, the menu format is used here to open it.
After opening, you can see two tabs: User Area and Workspace. The User Area represents the global default configuration, and the Workspace represents the current working configuration, that is, the configuration of the current project.
Because you want to modify the project, click the workspace. Search for the keyword encoding and change the encoding under Files.Encoding to the character set you want. Here I use GBK according to my project.
The configuration of the current project will be generated in the hidden folder .vscode in the root directory of the project. There is a settings.json file in it, which records the differences from the default configuration. As long as this file exists, the current project will be customized according to its description without affecting other project configurations.