Hey everyone.

In a nutshell this is what I want to do.

I want to:
- Allow developers to write code in C++ using non-latin based languages. i.e > use #define (or whatever) to specify a non-latin based character as a keyword/variable.

e.g >

Instead of (English):

if(x < 1){

I want to be able to (Korean, won't display if you don't have support for asian languages) :

만약(ㅂ < 1){

Now I tried using #define but obviously the compiler (gcc) didn't like the non-latin characters.

Anyone got any idea how to enable support in GCC or where is the actual problem ?

10 Years
Discussion Span
Last Post by Narue

>Anyone got any idea how to enable support in GCC or where is the actual problem ?
What you want (to a point) is some kind of extended character set for your compiler. Unicode is widely supported by compilers these days, so for example you can already change "Hello" to "안녕" and x to ㅂ if your compiler supports Unicode.

What you can't do is replace if with 만약 because that changes the code points, and thus, the meaning of the keyword. Regardless of the native language you want to program in, the English keywords of C++ will remain English unless you write some kind of preprocessor to convert your native language translations of the keywords to valid C++.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.