How to config visual studio to use UTF-8 as the de

2020-07-02 09:51发布

问题:

I did the search, but only found ways to change the encoding for individual files. I want to start projects with the encoding already configured as UTF-8.

回答1:

I found two ways

Alternate

There is alternate way, please try it

Tools->Options->Environment->Documents

The last

If that can't you can try to save it as UTF-8, you can save as with advanced options



回答2:

Tools->Options->Text Editor->General



回答3:

It's possible to set the locale code page to 65001, and VS will save all files with utf-8. https://en.wikipedia.org/wiki/Unicode_in_Microsoft_Windows#UTF-8

But since it's a beta function, there will be some bugs.

also reference https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8/1451686