News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

shared source file codepage trouble

Started by jimmyo, August 10, 2007, 10:49:24 AM

Previous topic - Next topic

jimmyo

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


dje

Hi !

You have to play with default encoding on the Settings\Editor...

Dje

Biplab

#2
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.
Be a part of the solution, not a part of the problem.

rjmyst3

Visual Studio cannot handle UTF-8 until version 8 (2005).
Even then, the complier will not recognize it as UTF-8 without a BOM.

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.  :(
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

dje

Hi Biplab !

Quote from: Biplab on August 10, 2007, 11:51:43 AM
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

jimmyo

Hi all,

Thanks for help,
Change in the Editor Settings to WINDOWS 1252, and it work.

Thanks all,
  Jimmy

Biplab

Quote from: dje on August 10, 2007, 02:11:55 PM
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.
Be a part of the solution, not a part of the problem.

dje

Thanks for these precise info Biplab

Dje