John S
John S

Reputation: 8351

Visual Studio inserting unwanted text at the beginning of CSS files

For the last several versions Visual Studio has been inserting odd characters at the beginning of the CSS files. I know it has something to do with the the encoding of the text file (It is the Unicode Byte-Ordering-Mark (BOM). ). A few versions ago I was able to change a setting so that VS would save the files differently and stop doing that but I can not seem to find any notes on what that setting was.

That extra code seems to affect some browsers' interpretation of the css file or at least the first piece of css code after the BOM.

TIA

Upvotes: 1

Views: 123

Answers (1)

chue x
chue x

Reputation: 18823

In VS 2012, under Tools > Options, there is the option to Save documents as Unicode:

Doc Options

If you have it checked, try unchecking it. You will probably have to make sure that your css files contain legitimate characters for whatever codepage you are using.

Upvotes: 1

Related Questions