This is the mail archive of the
mailing list for the GDB project.
RE: Using UTF-8 as host charset
- From: <Paul_Koning at Dell dot com>
- To: <mathiaskunter at gmail dot com>, <gdb at sourceware dot org>
- Date: Mon, 5 Mar 2012 10:12:51 -0600
- Subject: RE: Using UTF-8 as host charset
- References: <4F52480A.email@example.com>
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.
From: firstname.lastname@example.org [mailto:email@example.com] 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 http://sourceware.org/ml/gdb/2010-08/msg00129.html
> 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 https://bugs.eclipse.org/bugs/show_bug.cgi?id=307311