c++stringunicodemultiplatformwstring

What is the optimal multiplatform way of dealing with Unicode strings under C++?


I know that there are already several questions on StackOverflow about std::string versus std::wstring or similar but none of them proposed a full solution.

In order to obtain a good answer I should define the requirements:

I would really appreciate only one proposed solution per answer, by doing this people may vote for their prefered alternative. If you have more than one alternative just add another answer.

Please indicate something that did worked for you.

Related questions:


Solution

  • Same as Adam Rosenfield answer (+1), but I use UTFCPP instead.