views:

611

answers:

2

I love this site - any question that I'm just too lazy (or not good enough) to look up and I can hope that StackOverflow will come through...

Is there any way to set visual studio 2005 and 2008 to default new xml/xsl/xsd files to be utf-8 instead of utf-16?

i've done some looking but i just can't find a good site to refer to.. also i've looked all over the options but i don't see it...

any clue?

A: 

apparently this is impossible... :(

dovholuk
A: 

Since you can’t set the default in the options, you may consider these alternatives: http://devblog.ailon.org/devblog/post/2007/11/05/File-Encoding-in-Visual-Studio.aspx

The default encoding is based on the language Windows is set to. However, you may be able to change that. In Visual Studio, click Options > Environment > International Settings. Set to “English” if you can. That’s what my VS is set to, and my new XML files default to utf-8.

Also, you can always change the encoding when you save a file, even though that’s not really the solution to your problem. Click File > Advanced Save Options, and select UTF-8.

Jeremy