User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 391,682 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,188 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser:
Views: 256 | Replies: 1
Reply
Join Date: Jul 2008
Posts: 1
Reputation: caismirt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
caismirt caismirt is offline Offline
Newbie Poster

non-latin character support in C++/C/Java etc

  #1  
29 Days Ago
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){
"Hello"
}

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 ?
Last edited by caismirt : 29 Days Ago at 2:25 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 6,017
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 414
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: non-latin character support in C++/C/Java etc

  #2  
29 Days Ago
>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++.
Member of: Beautiful Code Club.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Computer Science and Software Design Marketplace
Thread Tools Display Modes

Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 2:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC