[csw-maintainers] UTF-8 on the buildfarm
Sebastian Kayser
skayser at opencsw.org
Thu Oct 8 19:11:25 CEST 2009
Hi Maciej,
Maciej (Matchek) Blizinski wrote on 08.10.2009 18:12:
> One more thing: Perl complains:
>
> ------------8<-------------
> maciej at login [login]:~ > pkgutil -h
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> LC_ALL = "en_US.UTF-8",
> LANG = "en_US.UTF-8"
> are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
> Pkgutil 1.5, install Solaris packages the easy way.
>
> Usage: pkgutil [option]... [package](-[version])...
> ------------8<-------------
>
> On my boxes, it doesn't complain at all.
that's a matter of the installed (available) locales. The requested
UTF-8 locales are currently just not installed on the login box.
$ locale -a
C
POSIX
iso_8859_1
localeadm can be used on Solaris 10 to install the missing locales from
the installation medium. As a side note: LC_ALL and LANG is IMHO more
than you would need. Both are responsible for setting locale category
settings (LC_*). LC_ALL overrides all LC_* categories, while LANG is a
fallback for those that are undefined. An example:
$ LC_CTYPE=en_US.UTF-8 locale
LANG=
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
The locale values enclosed in double quotes are the ones derived by LANG
or LC_ALL (default C), those without double quotes are explicit ones.
Another example, use a fallback via LANG, set LC_CTYPE explicitly.
$ LANG=en_US LC_CTYPE=en_US.UTF-8 locale
LANG=en_US
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_ALL=
Now if we set LC_ALL, it has priority over LANG as well as over the
explicit LC_CTYPE.
$ LANG=en_US LC_CTYPE=en_US.UTF-8 LC_ALL=C locale
LANG=en_US
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=C
Makes sense?
Sebastian
More information about the maintainers
mailing list