Hi

I have a text chat program based on libjingle.  When i use PSI to send
one Chinese character to my program, libjingle pass up the message in
utf-8 format (eg, const std::string &msgbody)

I try to print the chinese character by:

std::cout << msgbody;

The output is a wrong character. I expected that the Chinese character
will be displayed properly on the CMD console.

I try to use:

MultiByteToWideChar(CP_UTF8, 0, msgbody.c_str(),msgbody.length()+1,
wszMsgbody,4 );

And the wszMsgbody does store the correct unicode number of the
correct chinese character.
But the output of std::cout << wszMsgbody[0] only display the correct
unicode number(like 21476) instead of showing it as a chinese
character.

Please help.

regards
peter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-talk-open" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-talk-open?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to