Author Topic: How to prevent autoswitch to Unicode?  (Read 2886 times)

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 83
    • Fun electronic
How to prevent autoswitch to Unicode?
« on: May 01, 2011, 02:28:05 pm »
Hello All.
I have a problem to put Russian letters to the code.

For example:
Code
char * Text = "Привет всем";
If I do this, Code::Blocks automatically switch the encoding of the file to Unicode. and this string is now not 11 bytes + zerro, but 22 bytes + zero. And the program does not work with that.

The question - how to prevent the auto switch of CB to Unicode?

In the editor settings in "Use encoding when opening files" the Win-1251 is selected.

Thanks in advance.

Alexei

Offline MasterAlexei

  • Multiple posting newcomer
  • *
  • Posts: 83
    • Fun electronic
Re: How to prevent autoswitch to Unicode?
« Reply #1 on: May 01, 2011, 04:30:36 pm »
Oh. Have found it :)

In the "Use this encoding" Group there must be the "As default encoding (bypassing C::B's autodetection)" item selected.
And (may be) uncheck the Checkbox "if conversion fails, using the settings above, try system locale settings".

The topic can be closed, I think.