International Language Environments Guide for Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Legacy Locales

While the default system locales in Oracle Solaris use UTF-8 encoding, a number of legacy locales can be used as well.


Note - The GNOME desktop environment supports only UTF-8 locales.

Legacy locale support is contained in the system/locale/extra package. Run the following command to install legacy locale support:

# pkg install pkg:/system/locale/extra

To enable support for a specific language, set the corresponding locale facet to true. For example, to install the da_DK.ISO8859-1 locale (and, in fact, all of the da_DK locales), you would enable facet.locale.da and facet.locale.da_DK as follows:

# pkg change-facet facet.locale.da=True
# pkg change-facet facet.locale.da_DK=True

Locale Aliasing

While the most common locales are usually well supported across the major operating systems, their names are different in many cases. As an example, while Oracle Solaris uses fr_FR.UTF-8 as the locale name for French as spoken in France using UTF-8 encoding, IBM AIX uses FR_FR and HP-UX 11.11 and RHEL 5.4 use fr_FR.utf8. This inconsistency can be burdensome in a heterogeneous environment or when migrating to Oracle Solaris.

To address this issue, support for locale aliases has been introduced in libc in Oracle Solaris 11. Locale name aliases are accepted and mapped to corresponding canonical locale names, if any, during the locale selection process, as specified in setlocale(3C), and message object or message catalog processing, as specified in gettext(1), catopen(3C), and gettext(3C) man pages.

In addition, to provide better compatibility with earlier Oracle Solaris releases, the messaging functions now look for the message object or catalog using the obsolete Solaris locale names, such as fr or fr_FR, as additional locale names to check against. For more information, see “Short Form Locales” in the “Localization” section on the Oracle Solaris 11 - End of Feature Notices page.

A typical use case is a predominantly Linux environment where the Linux style locale name is used in the locale announcement in the user's shell initialization file. For example, the command setenv LANG ja_JP.utf8 is included in $HOME/.login, and the home directory is NFS-mounted. In this network environment, when a user logs into an Oracle Solaris 11 system, the locale alias support mechanism will internally and transparently map the locale name into the corresponding Oracle Solaris locale name, which is ja_JP.UTF-8, and will honor, and support the user-specified locale name. In the same way, when non-Solaris locale names are passed to a remote Oracle Solaris 11 machine through ssh(1), they will be recognized, honored, and supported.

For more details, refer to the locale_alias(5) man page, which also has full lists of locale name mappings.