std::string and UTF-8 encoded unicode

后端 未结 3 1288
耶瑟儿~
耶瑟儿~ 2021-01-05 11:27

If I understand well, it is possible to use both string and wstring to store UTF-8 text.

  • With char, ASCII characters take a single byte, some chinese charac

3条回答
  •  没有蜡笔的小新
    2021-01-05 11:30

    You can't handle Unicode with std::string or any other tools from Standard Library. Use external library such as: http://utfcpp.sourceforge.net/

提交回复
热议问题