This is the mail archive of the
mailing list for the GDB project.
Re: Using UTF-8 as host charset
- From: Tom Tromey <tromey at redhat dot com>
- To: Mathias Kunter <mathiaskunter at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 05 Mar 2012 09:40:54 -0700
- Subject: Re: Using UTF-8 as host charset
- References: <4F52480A.firstname.lastname@example.org>
>>>>> "Mathias" == Mathias Kunter <email@example.com> writes:
Mathias> Dear members of the gdb mailing list,
Mathias> I'm working on a patch for Eclipse which adds full charset support to
Mathias> the CDT debugger. We're setting gdb's host-charset to UTF-8 to achieve
Mathias> this. There already had been discussion about this back in 2010 here
Mathias> on the gdb mailing list. Tom Tromey said back then - quoted from
Tom> It is an oddity that currently an MI consumer must check gdb's
Tom> host charset in order to know how to decode its output. I would
Tom> recommend that the client force it to be UTF-8, but I think this
Tom> currently may not work with PHONY_ICONV.
Mathias> So the question is, is it actually a good idea to simply always set
Mathias> gdb's host charset to UTF-8? Which hosts do use the phony iconv, and
Mathias> is it indeed a problem for them if the host charset is UTF-8?
I think it probably isn't really safe to just set host-charset.
Instead you should arrange to run gdb in a UTF-8 locale.
I'm not sure exactly what might break though.
This area is somewhat of a mess. I wouldn't mind fixing MI. However, I
don't know exactly what would be most useful. Also, because some hosts
have bad iconv implementations, you are at the mercy of whoever built
gdb. IMNSHO, for non-Linux hosts, everybody ought to build against GNU
libiconv; but I am not positive that this is universally done.