#include <atlbase.h>
int main()
{
char* pszOctText = "\344\270\273\346\234\272\345\220\215"; //"主机名" , 8进制格式,UTF-8编码
char* pszHexText = "\xe5\x8d\xa1\xe5\x8f\xb7"; //"卡号" , 16进制格式,UTF-8编码
char *pszUnicodeText="\u73b0\u4ee3\u8857\u666f"; //现代街景,Unicode character
CString strText1 = CA2W(pszOctText,CP_UTF8);
CString strText2 = CA2W(pszHexText,CP_UTF8);
//MessageBox(NULL,strText2,strText1,MB_OK);
puts(CW2A(strText1));
puts(CW2A(strText2,CP_ACP));
puts(pszUnicodeText);
system("pause");
return 0;
}