| | |
chinese ascii
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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: 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
I know that:
TEXT("\u03a3")I need this asap,
thanks
Gabrielle
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.
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.
Last edited by Ancient Dragon; Mar 8th, 2007 at 11:17 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
I'm using TCHAR, I need to write a chinese word on a button. It doesn't work by simply entering them.
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.
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: two array comparison
- Next Thread: HELP REGARDIN c/c++ PROGRAMMIN IN VISUAL STUDIO.NET
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






