views:

342

answers:

2

The problem: I edit a .vcproj file, save it as UTF-8 (and specify that in the xml header), and when I open it in VS, the next time it saves it the encoding reverts back to CP-1255/1252/1251 (depending on the Localized Settings on the machine).

This has become a problem in our R&D, since whenever someone commits a .vcproj file the encoding changes according to their machine's configuration. How can I configure VS to just use UTF-8 and stop this back and forth ANSI encoding dance?

+1  A: 

cheap answer: make all dev pc's have same Localized Settings.

Simeon Pilgrim
some people speak different languages.. not really possible.
Assaf Lavie
A: 

Maybe you should try adding the BOM (http://en.wikipedia.org/wiki/Byte_order_mark) to your files. I know of one program which can do it for you, it's actually just 3 bytes at the beginning of your files. Go into the "Format" menu and try the different UTF-8 options.

speps