Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I tell VS 2008 to stop putting byte-order marks in front of my files?

By default, Visual Studio 2008 puts the Unicode byte-order mark in front of any file you save. You can override this on a per-file basis by going to File > Advanced Save Options and picking a different encoding.

How do I tell VS to use a default encoding for all files in a particular project or solution? This is drastically screwing up source control, because we have some users who commit files with VS and others who don't, creating "illusory" commits.

like image 870
sassafrass Avatar asked Feb 01 '26 08:02

sassafrass


1 Answers

As far as I know there is no option to globally set the encoding in VS 2008. In the express edition that I have "Advanced saves as" is the only option to change the encoding.

There is a work around however - you can get visual studio to use a different encoding by setting the computers regional settings to, say, English for example. This would in turn force VS to use 'Western European - Codepade 1252' rather than 'Unicode UTF-8 - Codepage 65001'. Again, this works in the Express edition and I'm pretty sure it will in the full application.

Hope that helps...

F.

like image 54
Fraser Avatar answered Feb 02 '26 20:02

Fraser