本文共 400 字,大约阅读时间需要 1 分钟。
//utf8Str:以字节(char*或者Byte*)读取中文的字符串(乱码)CString UTF8toUnicode(const char* utf8Str){ UINT theLength=strlen(utf8Str); return UTF8toUnicode(utf8Str,theLength);}CString UTF8toUnicode(const char* utf8Str,UINT length){ CString unicodeStr; unicodeStr=_T(""); if (!utf8Str) return unicodeStr; if (length==0) return unicodeStr; WCHAR chr=0;//一个中文字符 for (UINT i=0;i
详解见:仔细研究
转载地址:http://majub.baihongyu.com/