Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: 00061205 on June 15, 2008, 04:59:25 pm
-
Is there a method to save the source files in UTF-8 format in C::B?
In windows version C:B,the source files will not save by UTF-8 format. Gcc will report error if there are some local characters (eg. á é í ó ú ñ Ñ É 中文) in the source files. If we convert the source files to UTF-8 format manually with other applications this problem will overcome.
-
Yes there is. Click-
1) Edit > File encoding > UTF-8.
2) Edit > File encoding > Save byte-order-mark (BOM)
The second option is necessary if you want to force every source files to be detected as UTF-8.
-
Yes there is. Click-
1) Edit > File encoding > UTF-8.
2) Edit > File encoding > Save byte-order-mark (BOM)
The second option is necessary if you want to force every source files to be detected as UTF-8.
Thanks.
It works when just enable Edit > File encoding > UTF-8. When I complie with both enabled I get this error message:E:\CodeBlocks\CBProjects\hword\hword.cpp|1|error: stray '\239' in program|
-
Thanks.
It works when just enable Edit > File encoding > UTF-8. When I complie with both enabled I get this error message:E:\CodeBlocks\CBProjects\hword\hword.cpp|1|error: stray '\239' in program|
Try adding -finput-charset=utf-8 to compiler options.
-
Rather, add no option, and don't use that byte order mark. UTF-8 is gcc's default encoding.
-
I must manually enable edit->file encoding->utf-8 before i compile a new file which contain unicode characters.
How to set C::B handle file in UTF-8 format defaultly?
-
How to set C::B handle file in UTF-8 format defaultly?
Settings -> Editor -> General Settings -> (in the "font" part:) "Default encoding when opening files"
-
How to set C::B handle file in UTF-8 format defaultly?
Settings -> Editor -> General Settings -> (in the "font" part:) "Default encoding when opening files"
Thanks MortenMacFly.