Change the encoding of a file in Visual Studio Code

后端 未结 3 981
北海茫月
北海茫月 2020-11-27 14:13

Is there any way to change the encoding of a file? For example UTF-8 to ISO 8859-1?

Setting Example Sublime Text:



        
3条回答
  •  南方客
    南方客 (楼主)
    2020-11-27 14:44

    The existing answers show a possible solution for single files or file types. However, you can define the charset standard in VS Code by following this path:

    File > Preferences > Settings > Encoding > Choose your option

    This will define a character set as default. Besides that, you can always change the encoding in the lower right corner of the editor (blue symbol line) for the current project.

提交回复
热议问题