en_us.utf-8 locale on OpenSolaris
Tags:
This is mainly a pointer for me to remember things. .
If you have an OpenSolaris 200x.xx installed as a minimal image (like that one) you will notice that there is a rather unfriendly assortment of locales installed:
1 2 3 4 | locale -a C POSIX iso_8859_1 |
What we (or at least I) want instead is the “default” locale en_us.UTF-8
Google has pointed me to the localeadm tool to solve this. However this tool seems not to be available anymore on Opensolaris. Instead, one is expected to do the following:
1 | pkg install lang-support-english |
This installs ca. 135 MB of packages. Unfortunately one of them is a complete X.org server which I specifically did not want to install in the first place as the system is intended to be a server where I deem an X server to be just unnecessary cruft. Fortunately, it is not started by default, so it seems, I have to live with that.
another call of locale -a shows us a much friendlier view on the system:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | locale -a C POSIX en_AU en_AU.ISO8859-1 en_AU.UTF-8 en_CA en_CA.ISO8859-1 en_CA.UTF-8 en_GB en_GB.ISO8859-1 en_GB.ISO8859-15 en_GB.ISO8859-15@euro en_GB.UTF-8 en_IE en_IE.ISO8859-1 en_IE.ISO8859-15 en_IE.ISO8859-15@euro en_IE.UTF-8 en_MT.UTF-8 en_NZ en_NZ.ISO8859-1 en_NZ.UTF-8 en_US en_US.ISO8859-1 en_US.ISO8859-15 en_US.ISO8859-15@euro en_US.UTF-8 iso_8859_1 |
To setup our newly installed locale, just put this line
1 | LANG="en_US.UTF-8" |
into the file /etc/default/init and reboot the system.
Sigh, sometimes are things so much easier on the Linux side of life.
The hint to the solution came from the OpenSolaris Forum btw.
Update 2010-02-23
You can also just install the locale files without the overhead that comes from lang-support-english. Just install on Opensolaris < Build 133
1 | pkg install SUNWlang-enUS |
or on Opensolaris >= Build 133
1 | pkg install system/locale/en_us |
0 Comments