Data type?
-
Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks
You'll need to probably make your program UNICODE aware. CString will automatically use TCHAR's (wide characters) to store your string. Have a gandar at Chris's article : http://www.codeproject.com/cpp/unicode.asp?target=unicode[^] **I Dream of Absolute Zero
**
-
Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks
hi Maybe your computer donot support Big5 code. CString is a good idea to process string. if you can't use it. I suggest that: to vc, char also is integer type, so you can do it as follow: static DWORD szChar[]={"你好嘛?"} hope a little help for you! dupengfei
-
Hi everybody I have a Chinese sentence;for example,"大家好", I don't know which kind of Data types I can use to assign this sentence to. I use CString, but it does not work. and the UNIT only read one word. Thanks
CString does work on Chinese characters even without _UNICODE being defined, if the operating system is able to display them. You can try:
CString str(_T("大家好")); // Do type the quotation marks in English! AfxMessageBox(str);
Compile and link the code on a Chinese operating system and it will work.