User forums > Using Code::Blocks
Cyrillic identifiers
Jenna:
According to the documentation it should work:
--- Quote from: http://gcc.gnu.org/onlinedocs/cpp/Implementation_002ddefined-behavior.html#Identifier%20characters ---Identifier characters.
The C and C++ standards allow identifiers to be composed of `_' and the alphanumeric characters. C++ and C99 also allow universal character names, and C99 further permits implementation-defined characters. GCC currently only permits universal character names if -fextended-identifiers is used, because the implementation of universal character names in identifiers is experimental.
--- End quote ---
The UCS and Unicode characterset is almost the same (according to wikipedia).
German umlauts also do not work for me, so either the documentation is incorrect or the intersection of ucs and utf is not as large as thought.
oBFusCATed:
I don't understand why they even bother to implement it...
petko10:
--- Quote from: jens on October 08, 2011, 07:09:44 pm ---According to the documentation it should work:
--- Quote from: http://gcc.gnu.org/onlinedocs/cpp/Implementation_002ddefined-behavior.html#Identifier%20characters ---Identifier characters.
The C and C++ standards allow identifiers to be composed of `_' and the alphanumeric characters. C++ and C99 also allow universal character names, and C99 further permits implementation-defined characters. GCC currently only permits universal character names if -fextended-identifiers is used, because the implementation of universal character names in identifiers is experimental.
--- End quote ---
The UCS and Unicode characterset is almost the same (according to wikipedia).
German umlauts also do not work for me, so either the documentation is incorrect or the intersection of ucs and utf is not as large as thought.
--- End quote ---
So as I understand you have to add "-fextended-identifiers" to the compilation line , have you tried it ?
--- Quote from: oBFusCATed on October 08, 2011, 07:20:38 pm ---I don't understand why they even bother to implement it...
--- End quote ---
Well as you may know there are some people who don't speak english natively , so it would be handy to have the option to write with your own alphabet :roll:
So here's what I understood :
--C::B has no problem with UTF
--GCC has no problem with UTF in comments , but
--C++ by standard works only with ASCII ,so it won't compile with non-ASCII in the code
--Still there is an experimental option to include universal letter identifiers with GCC
Now where do I try this option out , because I don't have experience with configuring the compiler ?
oBFusCATed:
--- Quote from: petko10 on October 09, 2011, 06:42:40 pm ---So as I understand you have to add "-fextended-identifiers" to the compilation line , have you tried it ?
...
Now where do I try this option out , because I don't have experience with configuring the compiler ?
--- End quote ---
Project -> Build options -> Compiler -> Other options
You can put it in the global compiler options, too, most of the times this is not a good practice.
--- Quote from: petko10 on October 09, 2011, 06:42:40 pm ---Well as you may know there are some people who don't speak english natively , so it would be handy to have the option to write with your own alphabet :roll:
--- End quote ---
Me too, but I don't see the benefit of writing programs in anything different than English.
petko10:
--- Quote from: oBFusCATed on October 09, 2011, 08:37:24 pm ---Me too, but I don't see the benefit of writing programs in anything different than English.
--- End quote ---
I tried to give a hint but you kind of passed it :) Say you're learning a second language with a different alphabet (for ex. - russian) and it happens so that C++ and all other good programming languages are in russian . Now you CAN make it all in russian ,but you'd rather name all your variables/functions in english :arrow:
Tryed the -fextended-identifiers but again - no luck , no difference what so ever . I'll dig in some russian forums to see if they've solved it :idea:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version