User forums > Using Code::Blocks
How to prevent autoswitch to Unicode?
(1/1)
MasterAlexei:
Hello All.
I have a problem to put Russian letters to the code.
For example:
--- Code: ---char * Text = "Привет всем";
--- End code ---
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.
Navigation
[0] Message Index
Go to full version