https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118058
Bug ID: 118058 Summary: std::to_wstring is incompatible with -fwide-exec-charset=EBCDIC-JP-kana Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- /usr/include/c++/14/bits/basic_string.h:4480:64: error: converting to execution character set: Invalid or incomplete multibyte or wide character 4480 | && wchar_t('.') == L'.' && wchar_t('e') == L'e') | ^~~~ and 10 more errors. As per https://www.ibm.com/docs/en/i/7.5?topic=sets-invariant-character-set-its-exceptions EBCDIC code page 290 does not have lowercase Latin characters. See also https://www.compart.com/en/unicode/charsets/IBM290 We would need to detect this charset during compilation (or preprocessing) and then use uppercase letters. The entire library is incompatible with -fexec-charset=EBCDIC-JP-kana producing more than 400 errors, because almost every string literal cannot be compiled, even "\n". Supporting -fwide-exec-charset=EBCDIC-JP-kana might be more feasible, but I don't know if any users expect it to work.