
1 Jul
2021
1 Jul
'21
4:56 p.m.
In C++17 and earlier, nowide::narrow can be used to convert from UTF-16 encoded strings (std::wstring) to UTF-8 encoded strings, stored in std::string. C++20 introduced std::u8string for UTF-8 encoded strings and it is incompatible with std::string. Is there some way I can get from std::wstring to std::u8string? It is not at all obvious from the nowide documentation.