views:

611

answers:

2

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?

A: 

Odd: My VS2005 at work and my copies of vs2008 and vs2005 at home all default to Utf-8.

Joel Coehoorn
+1  A: 

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

Eduardo Molteni