wchar&wstring
来自《C++ primer》
The wchar_t type is guaranteed to be large enough to hold any character in the machine’s largest extended character set. The types char16_t and char32_t are intended for Unicode characters.
在VS2015上进行试验,用下面的方式:
wchar_t ch(L'');
cout << hex << ch << endl;
打印字符的unicode16进制编码(VS源码文件为UTF-8带BOM编码,初始化ch的字符来自unicode字符集直接复制得到,网页编码为utf-8,复制得到的字符编码也为utf-8)