https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89118
--- Comment #4 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #2)
> I cannot reproduce the valgrind errors with any version of GCC, using
> valgrind 3.14.0
>
> My guess is that these are false positives from valgrind,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89118
--- Comment #3 from Jonathan Wakely ---
The classic "C" locale does not use UTF-8, so the codecvt facet doesn't perform conversions to UTF-8.
If I use:
std::locale::global(std::locale("C.UTF-8"));
then the results are correct. I think
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89118
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89118
--- Comment #1 from vagran ---
If using std::locale::classic() it additionally does not return valid result as
well. According to standard it should. See notes:
https://en.cppreference.com/w/cpp/locale/locale/classic.