Author Topic: problem with encoding - magic!!!  (Read 2434 times)

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
problem with encoding - magic!!!
« on: April 06, 2009, 09:52:16 am »
Hello
I have a strange problem with encoding and no more ideas how to solve it.
Platform: Linux, Ubuntu 8.10
Lets say I have two files: bad.cpp and good.cpp. Both with proper iso-8859-2 encoding. I can edit them with no problems with gedit. But c::b one of them (good.cpp) shows ok while the second (bad.cpp) shows with wrong encoding. When I try to copy-paste a piece of text from bad.cpp into
good.cpp under c::b, it says that there is charset incompatibility and saves it in utf-8.
I have default encoding set do 8859-2 in c::b options.

It looks for me that c::b ignores my default encoding option and tries to guess (!!!) what is the encoding for each file. Sometimes misses... :(
I have many c++ files handled ok by c::b but a small couple of them are touched by this poblem which I don't know hot to solve :(

I would like to force c::b to use my encoding without guessing anything and without any inteligence that tries to check if all character codes are legal or not.

Any help?
« Last Edit: April 06, 2009, 10:13:29 am by froff »

Offline froff

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: problem with encoding - magic!!!
« Reply #1 on: April 06, 2009, 12:34:42 pm »
Ha! I made some investigation and found EncodingDetector with is used when opening files .
bool cbEditor::Open(bool detectEncoding)
Flag is set to true by default.
Is it any way to disable it permanently from gui, without c::b recompilation?

I can't find now where and how is Open function called :(