简体   繁体   中英

How to set default encoding of source file to UTF-8 in VS.NET 2005

I use Chinese in my comments and configs. And after I auto merge and check in source files, they become messy codes.

I guess the reason is TFS merge them by UTF-8 encoding but my VS.NET is using gb2312 encoding. I know I can get and change each file from menu [file->advance save option] Can't I set VS.NET 2005 always create and save C# files in UTF-8 encoding?

VS defaults to UTF-8 when the file is created inside VS. If the file was create (or modified) outside with other encoding, it will honor the existing encoding unless you "save as" -> UTF-8

奇怪:我的VS2005以及我的vs2008和vs2005的副本都默认为Utf-8。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM