How do I use 3 and 4-byte Unicode characters with standard C++ strings?
问题 In standard C++ we have char and wchar_t for storing characters. char can store values between 0x00 and 0xFF . And wchar_t can store values between 0x0000 and 0xFFFF . std::string uses char , so it can store 1-byte characters only. std::wstring uses wchar_t , so it can store characters up to 2-byte width. This is what I know about strings in C++. Please correct me if I said anything wrong up to this point. I read the article for UTF-8 in Wikipedia, and I learned that some Unicode characters