This method can change the encoding of files in VS, and is also applicable in Unity3D or other projects. For example, to solve the problem of Unity3D Chinese encoding error, the default encoding of VS Chinese version is likely to be GB2312 encoding, and sometimes you need to switch to UTF-8 encoding format.
specific method
On the top menu bar, Extensions-Manage Extensions, open the Manage Extensions window.
Search Encoding, find FileEnoding, click download (if the download is unsuccessful, you need to turn on VPN), and close VS after the download is completed. Wait until
this interface appears, select Modify, and restart VS after the installation is complete.
After restarting VS, you can see the option to change the encoding in the lower right corner of the file:
Summarize
Generally speaking, the commonly used encodings for Chinese are UTF-8 and GB2312. UTF-8 is an internationally unified standard, and GB2312 is a Chinese standard. Use it according to the situation. By the way, the author of this plug-in seems to be from China:). If you have time, you can go to the plug-in and leave a positive review!