This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: UTF-8 not working for MI?
Sorry for the poorly formatted reply: I'm on a dumb web client.
> Tom Tromey wrote:
>
> I can't readily find where the escaping is done, but the MI docs say:
> `C-STRING ==>'
> `""" SEVEN-BIT-ISO-C-STRING-CONTENT """'
> which I presume means that readers must do this decoding.
I guess that will have to be my solution, but it still seems suspicious
since running this MI command from CLI works (notice the value field):
(gdb) interpreter-exec mi "-var-create - * a"
^done,name="var1",numchild="0",value="228 L'ä'",type="wchar_t",has_more="0"
Or maybe using "interpreter-exec mi" does not quite give the true MI interpreter?
Marc
________________________________________
From: Tom Tromey [tromey@redhat.com]
Sent: August 19, 2010 2:20 PM
To: Marc Khouzam
Cc: 'gdb@sourceware.org'
Subject: Re: UTF-8 not working for MI?
>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
Marc> I've noticed that in MI mode, gdb does not show UTF-8 characters
Marc> properly.
Marc> The host character set is "auto; currently UTF-8".
Marc> ~"$1 = 228 L'\303\244'"
\303\244 is the UTF-8 representation of U+00E4
I can't readily find where the escaping is done, but the MI docs say:
`C-STRING ==>'
`""" SEVEN-BIT-ISO-C-STRING-CONTENT """'
which I presume means that readers must do this decoding.
Tom