When you edit a UTF-8 file in Visual Studio, it adds the byte order mark (BOM) sequence to the beginning of the file. You can select an encoding manually, but you need to do it each time you reopen the file.
Fix File Encoding automatically detects when a UTF-8 file is opened in Visual Studio and sets its encoding to UTF-8 without signature. If you don’t edit the file, it remains unmodified. If you edit the file, it will be saved without the BOM. You can configure which files to encode based on the file path and the file extension (by default, only .html files are protected from Visual Studio).
You can download the free Fix File Encoding extension for Visual Studio 2010 and Visual Studio 2012 from the Fix File Encoding homepage.
Visual Studio 2012/2010 can load a source file with UTF8 encoding without BOM(codepage 65001), but it will be saved as codepage 1252 instead of 65001. Can you please fix this using your extension?
Currently Fix File Encoding doesn’t know “real” encoding of a source file on disk. It can only check the encoding Visual Studio loaded the file with.
If it is OK for you to save *all* codepage 1252 files as UTF8 encoding without BOM, then I think this functionality can be added relatively easy.
Yes it’s OK to save all RC files with codepage 1252 as UTF8 (codepage 65001). Please make sure that you convert to UTF8 from internal UTF16, not from ascii with codepage 1252.
This encoding from VS 2013 Update 4 does not work. When I save a file with UTF8 encoding and without BOOM and open it with notepad++
the encoding says: ANSI.
Also when I save a file saved with your enabled extension, I always see in the advanced save option this:”Western europe – codepage 1252″ Is this normal behavior?
This extension only changes encoding from UTF-8 to UTF-8 without signature. If your original file is in the “Western europe – codepage 1252” encoding, it won’t be affected.