https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98723
--- Comment #9 from Luca Bacci <luca.bacci at outlook dot com> --- To respond the my previous comment: the expected string encoding is determined by the C locale in use, which is either the global one or imbued in std::regex_traits.