User forums > Using Code::Blocks
Cyrillic identifiers
petko10:
Hey , I'm a bulgarian programmer and want to use my own language here and there when programming but that often doesn't look good with the latin alphabet , so does anyone know how to configure C::B and GNU-GCC to work with Unicode (or something like that that would solve my problem) ?
oBFusCATed:
It is impossible. C/C++ is meant to work only with ASCII.
If you want to write code in Cyrillic, you'll have to switch to Java or something modern.
Keep in mind that having non ASCII chars even in the comments is not recommended,
because different OSes use different encodings most of the time.
thomas:
Well, both Code::Blocks and GCC do support UTF-8 as it happens. For GCC, that is even the default encoding. So, all you really need to do is to make UTF-8 the default encoding in the Editor settings ("Other settings" tab).
Which, at the risk of repeating myself, should be the default setting for everyone, since if you use any other encoding, it's no surprise if GCC throws up (as Code::Blocks does not do -finput-charset).
petko10:
Well , yes , the encoding is set to UTF-8 in the editor settings and there is no problem with comments in cyrillic , but the compiler outputs a biiig sequence of errors and is apparently not happy when I use non-ASCII letters for identifiers . I chose "use as default (bypass C::B auto-detection)" also , but no luck .
Other ideas ?
MortenMacFly:
--- Quote from: petko10 on October 08, 2011, 05:37:48 pm ---I use non-ASCII letters for identifiers.
--- End quote ---
What do you mean? Something like:
--- Code: ---äöü = 42;
--- End code ---
is not allowed by the C / C++ compiler, not the IDE, that's what oBFusCATed meant when saying:
--- Quote from: oBFusCATed on October 07, 2011, 06:08:17 pm ---It is impossible. C/C++ is meant to work only with ASCII.
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version