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

While it doesn't use phony iconv, there are some other questions that have come up on this in the past.  NetBSD (and possibly others) have an iconv implementation that doesn't provide the "wchar_t" encoding GDB assumes every iconv will have.  I remember trying to do something about this and running into concerns that wchar_t, formally speaking, is not the same as UCS-2 even though for practical purposes the two are interchangeable.


-----Original Message-----
From: [] On Behalf Of Mathias Kunter
Sent: Saturday, March 03, 2012 11:34 AM
Subject: Using UTF-8 as host charset

Dear members of the gdb mailing list,

I'm working on a patch for Eclipse which adds full charset support to the CDT debugger. We're setting gdb's host-charset to UTF-8 to achieve this. There already had been discussion about this back in 2010 here on the gdb mailing list. Tom Tromey said back then - quoted from

 > It is an oddity that currently an MI consumer must check gdb's  > host charset in order to know how to decode its output.  I would  > recommend that the client force it to be UTF-8, but I think this  > currently may not work with PHONY_ICONV.

So the question is, is it actually a good idea to simply always set gdb's host charset to UTF-8? Which hosts do use the phony iconv, and is it indeed a problem for them if the host charset is UTF-8?

Note that we're only talking about gdb 7.0 or later. We don't plan to support this feature for gdb < 7.0 within CDT.

Thanks for any hints!

PS: Just for reference: the corresponding Eclipse bug report can be found at

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