User forums > Using Code::Blocks
Wrong file encode detected.
MortenMacFly:
--- Quote from: edison on October 15, 2014, 11:13:02 am ---I have created a video for demo this issue:
--- End quote ---
I've seen this video. I am asking again:
--- Quote from: MortenMacFly on October 15, 2014, 08:52:39 am ---However, are you sure you've saved your file in a proper file format like UTF-8?
--- End quote ---
From your video it seems not. Strange is also that you are not being warned about that issue. Usually C::B does so.
edison:
--- Quote from: MortenMacFly on October 16, 2014, 08:33:49 am ---From your video it seems not. Strange is also that you are not being warned about that issue. Usually C::B does so.
--- End quote ---
I had uploaded another video which show CB can not correctly detect the utf-8 file that save by itself:
MortenMacFly:
--- Quote from: edison on October 17, 2014, 06:27:23 am ---I had uploaded another video which show CB can not correctly detect the utf-8 file that save by itself:
--- End quote ---
Well what happens is perfectly OK. As you create an UTF-8 w/o BOM and have setup windows-936 as default encoding it will be used when opening the file. There is no way you can distinguish exactly between UTF-8 and windows-936 in case you've only ANSI characters in the file.
So either you use UTF-8 with BOM or start just coding your Korean (whats-o-ever) stuff into the file. :)
edison:
--- Quote from: MortenMacFly on October 17, 2014, 07:45:26 am ---
--- Quote from: edison on October 17, 2014, 06:27:23 am ---I had uploaded another video which show CB can not correctly detect the utf-8 file that save by itself:
--- End quote ---
Well what happens is perfectly OK. As you create an UTF-8 w/o BOM and have setup windows-936 as default encoding it will be used when opening the file. There is no way you can distinguish exactly between UTF-8 and windows-936 in case you've only ANSI characters in the file.
So either you use UTF-8 with BOM or start just coding your Korean (whats-o-ever) stuff into the file. :)
--- End quote ---
but why if I use defaut encode(windows-936) to save file and CB will detect it as other encode ? Is it normal? Why other editor(for example notepad++) have not such problem?
MortenMacFly:
Because with the content you have in the file you have multiple options for a valid encoding. They're is no single solution. That's handled differently by editors. That's why I said enter some characters that make it easier for the detection engine to identify your language. We are using the same mechanism Mozilla uses,btw...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version