944,015 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 4426
  • C++ RSS
Mar 8th, 2007
0

chinese ascii

Expand Post »
I am trying to use chinese letters in a c++ program I'm writing. does anyone know how this can be done?
I know that:
TEXT("\u03a3")
will print out a latin letter, so how do I get a chinese character, and perhaps there is an easier way?

I need this asap,

thanks
Gabrielle
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
gabs is offline Offline
26 posts
since Dec 2006
Mar 8th, 2007
0

Re: chinese ascii

What are you trying to do? web-page, data crunching, simple test programs.. ??
Anyway all I remember is that from C++ you just gotta print the chars as they are, depending on where they are being printed (on console/web-page...) it'll appear appropriately ! I.e. if the fonts are appropriately installed and configured for the console/web-page. Although for web-pages you also have some http tags to consider.
Only thing to keep in mind while coding is that use wchar (or may be it was uchar) instead of char, as char can't represent all chinese characters (there are more than 256).
Check up MSDN for chapters on Unicode support may be you'll find something.
Reputation Points: 254
Solved Threads: 74
Practically a Posting Shark
thekashyap is offline Offline
804 posts
since Feb 2007
Mar 8th, 2007
0

Re: chinese ascii

I'm using TCHAR, I need to write a chinese word on a button. It doesn't work by simply entering them.
Reputation Points: 10
Solved Threads: 1
Light Poster
gabs is offline Offline
26 posts
since Dec 2006
Mar 8th, 2007
0

Re: chinese ascii

do you have your compiler set up to define UNICODE and _UNICODE macros? Otherwise, I don't know a thing about Chinese language.

Also, here is something I found with google. It appears your computer needs to have Chinese language installed.
Last edited by Ancient Dragon; Mar 8th, 2007 at 11:17 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Mar 8th, 2007
0

Re: chinese ascii

and even if you do, the display device has to know how to display those Unicode characters or it will show something else.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Mar 9th, 2007
0

Re: chinese ascii

Click to Expand / Collapse  Quote originally posted by gabs ...
I'm using TCHAR, I need to write a chinese word on a button. It doesn't work by simply entering them.
Then all the more reason to read MSDN for chapters on Unicode support may be you'll find something.

If UNICODE is not defined TCHAR expands to just a char.

If you're using MFC, may be you can use CFont as well. (make sure that appropriate font is already installed on your PC as jwenting says.
Reputation Points: 254
Solved Threads: 74
Practically a Posting Shark
thekashyap is offline Offline
804 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: two array comparison
Next Thread in C++ Forum Timeline: HELP REGARDIN c/c++ PROGRAMMIN IN VISUAL STUDIO.NET





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC