UTF-8 without BOM

BOM or Byte Order Mark is sometimes quite annoying. Visual Studio does not change the file unless you save it (as Hans said).

And here is the solution to your problem: If you want to save a file with other encodings, select save as and extend the save button in file dialog and select "Save with encoding". Or if you want to get rid of this setting permanently, just open File menu and select "Advanced save options" and there you should select "UTF-8 without signature" (and that also answered your last question :). Yes "UTF-8 without signature" is same as without BOM.


Now with pictures.

  1. Go to File -> Save As.

    File/Save As

  2. Then on Save button click on triangle and click Save with Encoding....

    Save with Encoding

  3. Click ok to overwrite the file then from list of encodings find UTF-8 Without signature -> Click OK.

    UTF-8 Without signature

Hope this saves you some time.


Unfortunately this does not work with csproj files. There is no "Advanced save option" and even though you have set it to "UTF-8 without signature" for a cs file, csproj files still are saved with BOM. If you use VSS it still complains about project files.


I've created the Fix File Encoding extension that prevents Visual Studio 2010+ from adding BOM to UTF-8 files.