From: Tom Tromey <tom@tromey.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sourceware.org
Subject: Re: Thread names and non-ASCII characters
Date: Thu, 19 Dec 2019 17:22:00 -0000 [thread overview]
Message-ID: <87lfr8cjsi.fsf@tromey.com> (raw)
In-Reply-To: <831rt02vlb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Dec 2019 17:17:36 +0200")
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> Can someone tell what GDB assumes to be the character encoding used by
Eli> thread names we get from the system APIs (such as pthread_getname_np)?
Eli> It sounds like we assume the host character set, since the functions
Eli> used to display the thread name don't perform any encoding conversion.
Eli> Is my understanding correct?
Yes, I believe so.
Eli> I'm asking because Windows 10 introduces a new API for setting and
Eli> getting a thread's name, but this API wants a UTF-16 encoded string,
Eli> so if we want to use it, we need to decide from/to what encoding to
Eli> convert to/from UTF-16.
Converting to the host charset is probably the thing to do.
If the host charset is decided incorrectly, then enhancing charset.c to
choose a better one would help in other places as well.
convert_between_encodings can be used to do the translation.
Tom
next prev parent reply other threads:[~2019-12-19 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 15:17 Eli Zaretskii
2019-12-19 17:22 ` Tom Tromey [this message]
2019-12-19 17:55 ` Paul Koning
2019-12-19 18:25 ` Tom Tromey
2019-12-19 19:02 ` Eli Zaretskii
2019-12-19 18:59 ` Eli Zaretskii
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=87lfr8cjsi.fsf@tromey.com \
--to=tom@tromey.com \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.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: 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