This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using UTF-8 as host charset

>>>>> "Mathias" == Mathias Kunter <> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]