[Bug libstdc++/95048] [9/10/11 Regression] wstring-constructor of std::filesystem::path throws for non-ASCII characters

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 11 21:25:23 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95048

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Argh, this only works if the wide encoding happens to be UCS-4 (or for 16-bit
wchar_t, UCS-2) because std::codecvt_utf8 only supports converting between that
and UTF-8. Which is why I used std::codecvt<wchar_t, char, mbstate_t> in the
first place.


More information about the Gcc-bugs mailing list