User forums > Using Code::Blocks

Wrong file encode detected.

<< < (3/3)

MortenMacFly:
...not to forget that another perfect solution is to use a file with bom if the target compiler supports this.

edison:

--- Quote from: MortenMacFly on October 21, 2014, 10:50:15 pm ---...not to forget that another perfect solution is to use a file with bom if the target compiler supports this.

--- End quote ---

But I had encouter a problem when using UTF8 w/BOM:
There is some un-readable charter(s) in the first line (for example, the first line should be #include xxxx, but with UTF8 w/BOM that was changed to ("??")#include xxxx in the CB editor).

MortenMacFly:
I don't know what exactly you do wring, but it works perfectly here:

Steps:
- Create a new file
- enable to use BOM
- save as UTF-8
- close file
- re-open file
-> Result: UTF-8, no matter if I had added ANSI or unicode characters from your example.

Navigation

[0] Message Index

[*] Previous page

Go to full version