Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: MasterAlexei on May 01, 2011, 02:28:05 pm

Title: How to prevent autoswitch to Unicode?
Post by: MasterAlexei 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
Title: Re: How to prevent autoswitch to Unicode?
Post by: MasterAlexei 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.