From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/cli] Don't emit emojis in MI
Date: Wed, 12 Aug 2026 14:02:32 -0600 [thread overview]
Message-ID: <87ecg3w1if.fsf@tromey.com> (raw)
In-Reply-To: <20260812114122.671945-1-tdevries@suse.de> (Tom de Vries's message of "Wed, 12 Aug 2026 13:41:22 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> I think we probably should encode unicode characters in MI error strings as
Tom> octal escapes, independent of the sevenbit-strings setting. This patch does
Tom> not address this part.
I think there are some other bugs concerning this FWIW.
I tend to think MI should not set sevenbit-strings and should just use
the host encoding. That way, clients could simply use UTF-8 and not
have to deal with the oddities here.
sevenbit-strings also seems pretty questionable to me. Like maybe it
made sense in the ancient times before the charset code was written, but
nowadays I think it's just a mistake.
Tom> As for implementation, I introduced a function emoji_allowed alongside
Tom> can_emit_style_escape, which defaults to the value of can_emit_style_escape.
Seems reasonable though:
Tom> + /* True if emojis are allowed on STREAM. */
Tom> + virtual bool emoji_allowed ()
Tom> + {
Tom> + /* By default, assume that emojis are not allowed on streams that don't
Tom> + support ANSI escapes. */
Tom> + return can_emit_style_escape ();
Tom> + }
...there's no present need for 'virtual' here, and if we do ever need
it, it is easy to add. So I would suggest removing that.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
prev parent reply other threads:[~2026-08-12 20:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 11:41 Tom de Vries
2026-08-12 20:02 ` Tom Tromey [this message]
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=87ecg3w1if.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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: link
Be 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