News:

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

Main Menu

How to prevent autoswitch to Unicode?

Started by MasterAlexei, May 01, 2011, 02:28:05 PM

Previous topic - Next topic

MasterAlexei

Hello All.
I have a problem to put Russian letters to the code.

For example:

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

MasterAlexei

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.