https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102613
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Is there anything we need to do here? >From what I can see, e.g. for static assertions which is one of the two changed points we reencode the message from -finput-charset= charset if supplied to UTF-8 and then emit the UTF-8 chars to the terminal regardless of locale's charset unobfuscated, so say given: static_assert (false, "��c"); and -finput-charset=ISO-8859-1 00.C:1:16: error: static assertion failed: áæc 1 | static_assert (false, "áæc"); | ^~~~~ is emitted, while without that -finput-charset= (i.e. when it is invalid UTF-8), we emit 00.C:1:16: error: static assertion failed: ��c 1 | static_assert (false, "��c"); | ^~~~~ On valid UTF-8 emoji: static_assert (false, "😀"); we emit 01.C:1:16: error: static assertion failed: 😀 1 | static_assert (false, "😀"); | ^~~~~ and with -finput-charset=ISO-8859-1 01.C:1:16: error: static assertion failed: ð 1 | static_assert (false, "ð"); | ^~~~~ Not really sure what to do for our testsuite for this though, because while we can use -finput-charset= in dg-options, we have no control on what the pseudo terminal encoding actually is.