[Alpine-info] nl_langinfo(CODESET) returns unrecognized value
mills at cc.umanitoba.ca
Tue Mar 25 06:36:22 PDT 2008
On Mon, Mar 24, 2008 at 10:42:40AM -0700, Steve Hubert wrote:
> On Mon, 24 Mar 2008, Gary Mills wrote:
> >This error always appears in my .pine-debug1 file. I'm running
> >alpine-1.00 on Solaris 10.
> > nl_langinfo(CODESET) returns unrecognized value="ISO8859-1", using
> > UTF-8 as default
> >Is this a problem? My locale is:
> > $ locale
> > LANG=en_CA.ISO8859-1
> > LC_CTYPE=en_CA.ISO8859-1
> > LC_NUMERIC=en_CA.ISO8859-1
> > LC_TIME=en_CA.ISO8859-1
> > LC_COLLATE=en_CA.ISO8859-1
> > LC_MONETARY=en_CA.ISO8859-1
> > LC_MESSAGES=en_CA.ISO8859-1
> > LC_ALL=
> It could be a problem, yes. Alpine is calling nl_langinfo(CODESET) to get
> the character encoding you are using. My first guess would be that LANG
> ought to have a hyphen between ISO and 8859 but that's definitely just a
No, the locale settings are correct for Solaris.
> Because it can't find the string it is using UTF-8 as a fallback, but that
> may not be correct for your display.
Yes, I see from the code that alpine only looks for ISO code sets with
names that include the hyphen. My limited research indicates that
there are three standard code set names, exemplified as ISO-8859-1,
ISO8859-1, and iso88591. Unix systems appear to use the ISO8859-1
form. This looks like a portability bug in alpine.
> According to the nl_langinfo man page I'm looking at on a redhat system
> CODESET (LC_CTYPE)
> Return a string with the name of the character encoding used in
> the selected locale, such as "UTF-8", "ISO-8859-1", or
> "ANSI_X3.4-1968" (better known as US-ASCII). This is the same
> string that you get with "locale charmap". For a list of charac-
> ter encoding names, try "locale -m", cf. locale(1).
> So you might try "locale -m" to see if your LANG value is spelled wrong.
That doesn't help:
$ locale -m
> You could work around the problem by explicitly setting "Display Character
> Set" in alpine to ISO-8859-1 (if that's what your display can handle) or
> to UTF-8 or something else if that's what your display can handle. The
> ISO-8859-1 in this case would be spelled like I've spelled it. That's the
> official Internet standard way to spell it and is unrelated to what the
> locale is spelled like on any particular system. Thanks.
For the time being, I've done that in the global pine.conf file.
Thanks for the information and quick response.
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-
More information about the Alpine-info