ANSI和UNICODE的区别

来源:互联网 发布:手机推广软件赚钱 编辑:程序博客网 时间:2024/05/16 06:22

ANSI编码CString默认是窄字节的
UNICODE默认是宽字节的
std::string总是窄字节的

所以UNICODE下我们需要做宽窄字节转换

比如可以这样
USES_CONVERSION;
CString str;
std::string str1 = W2A(str.Getbuffer());
str.ReleaseBuffer();
0 0