How to read/store unicode with STL strings and streams

前端 未结 2 632
日久生厌
日久生厌 2020-12-31 16:53

I need to modify my program to accept Unicode, which may come from any of UTF-8 and the various UTF-16 and UTF-32 encodings. I don\'t really know much about Unicode (though

2条回答
  •  醉话见心
    2020-12-31 17:29

    Have a look at the Switching from std::string to std::wstring for embedded applications? question

    As Pukku said: You might get some headache because of the fact that the C++ standard dictates that wide-streams are required to convert double-byte characters to single-byte when writing to a file, and how this conversion is done is implementation-dependent.

提交回复
热议问题