Is there a way to force VS to use Unicode always, instead of weird ISO-something?
I'm working on a winapp csproject using Visual Studio 2008 on Vista (Polish locale). The problem appears when I build the project on Win Server 2003 (English locale) - then Polish diacritic is gone.
I investigated that the issue is caused by improper source file encoding. It looks that source files aren't using UTF-8 encoding.
Now open one of your files in Visual Studio. To verify its saving as UTF-8 go to File > Save As, then under the Save button choose "Save With Encoding". It should choose "UNICODE (Save without Signature)" by default from the list of encodings.
In the Open With dialog box, choose the editor to open the file with. Many Visual Studio editors, such as the forms editor, will auto-detect the encoding and open the file appropriately. If you choose an editor that allows you to choose an encoding, the Encoding dialog box is displayed.
Problem: Compiler launched from command line cannot process the source file because of international characters that I’ve just added.
Solution: Save source file explicitly in UTF-8 encoding to preserve international characters.
How To:
You’re set. Commit to please the build server and rest of the team waiting for green.
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