How to setup Visual Studio Code to detect and set the correct encoding on file open

后端 未结 3 1120
暗喜
暗喜 2021-02-01 12:57

I recently started to use Visual Studio Code on Server Systems where I did not have Studio IDE installed. I like it very much but I\'m running into a problem.

When I open

3条回答
  •  野性不改
    2021-02-01 13:14

    • Go to File-> Preferences -> User Settings
    • Add (or update) the entry "files.encoding": "windows1252" to the right editor window and save

    Now VSCode opens all text files using windows-1252 when there is no proper encoding information set.

    EDIT: In 2017's June release the files.autoGuessEncoding setting was introduced. When enabled it will guess the file's encoding as good as possible. Its default value is false .

提交回复
热议问题