字符串 CString转换 unicode 中文 wcout 输出

1、unicode字符集下输出CString:

wcout.imbue(locale("chs"));
wcout << str.GetString() << endl;

2、unicode字符集下CString 与string的转换(提醒:存在个wstring)

\\CString->string:
USES_CONVERSION;
W2A(cStr.GetBuffer())
\\string->CString
CString cStr(str)

 

posted @ 2020-11-26 13:44  kuaqi  阅读(457)  评论(0编辑  收藏  举报