I am using Visual Studio Express 2012 for Web to edit some ANSI encoded html and javascript files. When I save the changes VS is changing the encoding of the files to UTF-8 with BOM.
Visual Studio issues the following warning:
The character encoding for the file file.htm has changed. Your source control provider may have problems managing files with this type of encoding. For example, if you save an ANSI-encoded file as UTF-8 you may not be able to merge or show differences.
Is there a way to make Visual Studio save files without changing encoding?
In your HTML files, put the following <meta> tag between the <head> and </head> tags:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
Next, save the files—Visual Studio will detect the <meta> tag and save the files in Windows-1252 (ANSI) encoding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With