Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: jimmyo on August 10, 2007, 10:49:24 am
-
Hello,
i use same source file under Windows with Visual Studio
and under Linux with Code::Blocks IDE.
if the sourcefile under windows has some extras char äöü,
CB-IDE convert it to other spcial chars
ö = ö
after compare this file for changes, i always have this changes.
can i change the codepage in CB-IDE, that it does not change this chars ?
Thanks
Jimmy
-
Hi !
You have to play with default encoding on the Settings\Editor...
Dje
-
If the file has UTF-8 encoding, C::B can deal with it. Otherwise if the file has an encoding UTF-16 or above, C::B may not be able to handle it.
-
Visual Studio cannot handle UTF-8 until version 8 (2005).
Even then, the complier will not recognize it as UTF-8 without a BOM (http://unicode.org/faq/utf_bom.html#29).
gcc expects files in UTF-8, unless instructed otherwise. But if the files have a BOM, gcc will not compile them.
I have no suggestion, just pointing out some potential problems. :(
-
Hi Biplab !
If the file has UTF-8 encoding, C::B can deal with it. Otherwise if the file has an encoding UTF-16 or above, C::B may not be able to handle it.
Why are all these encoding available if not supported in Code::Blocks ?
What happens if they are used (I suppose they are proposed because Scintilla supports them) ?
Dje
-
Hi all,
Thanks for help,
Change in the Editor Settings to WINDOWS 1252, and it work.
Thanks all,
Jimmy
-
Why are all these encoding available if not supported in Code::Blocks ?
What happens if they are used (I suppose they are proposed because Scintilla supports them) ?
The code to handle encoding is there. But, I guess, it was disabled long back due to some nasty crash. :)
I had the same doubt like you and I started playing with the code to enable these options. So far I've found the following.
- The disabled code can detect and handle files with upto UTF-16.
- But it works well if you move upwards. I mean if you move from UTF-8 to higher. Your file will become a garbage if you move downwards, i.e., UTF-32 to UTF-8.
- Presently UTF-16BE puts C::B into an infinite loop.
- The encoding handling code, file loading code needs a lot of improvements.
As you can understand, this is a vital code for C::B. Thus I'm still trying to figure out an optimal solution which I can put forward for further testing. :)
For the time being, please don't use C::B with an encoding beyond UTF-8.
-
Thanks for these precise info Biplab
Dje