News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Unicode format

Started by zhuxuan, January 08, 2007, 04:21:51 PM

Previous topic - Next topic

zhuxuan

I am a student in Taiwan. I use code::blocks with mingw before. Recently, I try to use code::blocks with Visual Studio 2005 Express Edition, and there are some Chinese in my code. I set the file encoding to UTF-8, but when I compiling, I got the warning ...

main.cpp : warning C4819: The file contains a character that cannot be represented in the current code page (950). Save the file in Unicode format to prevent data loss

I try to use other encoding, for example, Unicode default. It does solve this problem, but I cannot use other editor to edit the source file.

Anyone has the same problem? Any ideas ?
Thanks all.

rjmyst3

Microsoft's compiler requires a byte-order-mark to recognize it as a UTF-8 file. In Code::Blocks, go to Edit->File Encoding and select "Save byte-order-mark (BOM)" then save the file and compile.
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

zhuxuan

Thank you very very very very much !!!!
I got it !!