View Full Version : how to display Chinese Character?
coffea
06-11-2003, 09:01 PM
two ways:
1) use unicode string with the Resource Editor and bar files
2) use unicode string directly
I want to use the second way, but I don't know how to convert the ASCII code to the Unicode code.
Could anyone can give me some suggestion?
Thanks
ruben
06-13-2003, 09:04 AM
In the SDK examples you will find the following
const AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
AECHAR is nothing but UTF16/unicode string.
If your strings are in a text file you can open the file in notepad and save as UTF16 format.
regards
ruben
coffea
06-13-2003, 07:53 PM
the up method is not compatible for me.The char is passed in by the parameters.
Now I have write a function that convert the "char" Chinese character to UTF16.
kulimu
06-19-2003, 07:35 PM
can you send me a example of your method ?
I need it very much .
Thx
email: lufuonepiece@hotmail.com
coffea
06-19-2003, 07:55 PM
:)
frankfang
12-11-2003, 11:51 PM
I am stuck in the chinese display problem, could you show me the method you use to solve the it ?
my email:
frankfangcn@hotmail.com
Thrank you !!
ruben
12-12-2003, 06:03 AM
What you are trying to achieve? What is the encoding of your source string.
You can certainly do
AECHAR* pWstr = (AECHAR*)L"brew";
ruben
frankfang
12-14-2003, 09:27 AM
I receive menu items which is encoded in gb2312 from web server and display it on screen . But the chinese characters can not be dislpayed correctly. I tried (AECHAR*)L but I found it can only be used as (AECHAR*)L"chinese character" , but not as (AECHAR*)L(pChinese) in which "pChinese" is a pointer pointering to a Chinese string.
How can I solve it?
Thank you for your reply.
ruben
12-14-2003, 01:01 PM
STREXPAND is suppose to do the conversion from multibyte to wide character. For example from shift-JIS to UTF16 for japanese phone, from KSC5601 to UTF16 in korean phone. While back I was informed by Qualcomm tech support that, that STREXPAND and WSTRCOMPRESS is not implemented correctly in simplified chinese phone. You can try in your phone, if it works.
Otherwise, you need to implement the conversion routine based on lookup table(which is fairly large).
ruben
frankfang
12-14-2003, 06:24 PM
Tranks a lot .
vBulletin v3.0.13, Copyright ©2000-2009, Jelsoft Enterprises Ltd.