This is the mail archive of the gdb@sourceware.org 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


The issue here is that NetBSD has a fully functional iconv, except that it doesn't include the wchar_t "character set".  I think it has something to do with the notion that wchar_t is not the same as ucs-2, at least not in some corner cases.  I'm not particularly convinced, especially since GNU libiconv does make that exact equivalence.

	paul

-----Original Message-----
From: Tom Tromey [mailto:tromey@redhat.com] 
Sent: Monday, March 05, 2012 1:09 PM
To: Koning, Paul
Cc: mathiaskunter@gmail.com; gdb@sourceware.org
Subject: Re: Using UTF-8 as host charset

>>>>> "Paul" ==   <Paul_Koning@Dell.com> writes:

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

I guess NetBSD should use libiconv.

We could in theory write a portable "phony libiconv" that uses the standard C wide/multi-byte conversion functions.  But... libiconv already did this, so it seemed simpler to just reuse it rather than try to write our own.

Tom


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