https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89118
--- Comment #1 from vagran <vagran.ast at gmail dot com> --- 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.