C++支持1,2,3,4个字节的字符集,已有std::string,std::wstring,std::u8string,std::u16string,std::u32string
| std::string | "hello world" | char | ANSI |
| std::wstring | L"hello world" | wcahr_t | Unicode |
| std::u8string | U8"hello world" | char | UTF-8 |
| std::u16string | U"hello world" | char16_t | UTF-16 |
| std::u32string | U"hello world" | char32_t | UTF-32 |
Windows 的 API 包含了 Multibyte(ANSI)和 Unicode 两种接口,即A和W为后缀的两套 API
ANSI 编码:GB2312、GBK、GB18030、Big5、Shift、JIS
在简体中文的Windows系统中,ANSI 编码代表 GBK
浙公网安备 33010602011771号