This is the mail archive of the
mailing list for the GDB project.
Re: FYI: fix Solaris problem with auto host charset
- From: Eli Zaretskii <eliz at gnu dot org>
- To: tromey at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 18 Apr 2009 09:38:42 +0300
- Subject: Re: FYI: fix Solaris problem with auto host charset
- References: <email@example.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Tom Tromey <firstname.lastname@example.org>
> 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
> 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?