public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102613] [C++23] P2246R1 - Character encoding of diagnostic text Date: Tue, 22 Aug 2023 15:30:31 +0000 [thread overview] Message-ID: <bug-102613-4-QRVROnLR3J@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102613-4@http.gcc.gnu.org/bugzilla/> 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.
next prev parent reply other threads:[~2023-08-22 15:30 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-05 16:34 [Bug c++/102613] New: " mpolacek at gcc dot gnu.org 2023-08-22 15:30 ` jakub at gcc dot gnu.org [this message] 2023-08-22 15:33 ` [Bug c++/102613] " jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102613-4-QRVROnLR3J@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).