This is the mail archive of the gdb-patches@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: FYI: fix Solaris problem with auto host charset


> From: Tom Tromey <tromey@redhat.com>
> Date: Fri, 17 Apr 2009 17:49:58 -0600
> 
> On some versions of Solaris, nl_langinfo(CODESET) will return "646"
> for the C locale.  Unfortunately, this value is not then recognized by
> iconv_open.
> 
> This fixes the problem by recognizing this situation and using "ASCII"
> instead.  I'm unaware of any other names needing this treatment.

Btw, why is the code assuming that nl_langinfo always returns a
meaningful result?  It can potentially return an empty string.
Although this is at worst a very rare situation, perhaps we should
take it into consideration and fall back on GDB_DEFAULT_HOST_CHARSET.

Also, I don't quite get the reason why nl_langinfo is not called in
the PHONY_ICONV case.  It seems we blindly assume the native charset
is Latin-1 in that case, but perhaps nl_langinfo, if it exists, will
give a better guess?


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