https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90281
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- The problem is that I'm using codecvt_utf8<char16_t>, which converts between UTF-8 and UCS-2 (not UTF-16). The U+1D11E is outside the basic multilingual plane, so is not valid UCS-2. I need to use a different codecvt facet for UTF-16.