Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 1.5 Release Notes: release id B.11.20 for rx9610 and rx4610 hp servers and i2000 hp workstations > Chapter 6 Commands and System Calls

Changed locale and localedef Commands

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

To enable smooth migration from PA to IPF, both PA and IPF locale libraries and iconv methods need to exist on an Itanium-based system.

Directory Structure Changes

The current directory structure on 64-bit PA systems is:

/usr/lib/nls/loc/                    # PA32 locale directory
/usr/lib/nls/loc/locales.1           # PA32 versioned 10.20 locale libraries
/usr/lib/nls/loc/locales.2           # PA32 versioned 11.x locale libraries
/usr/lib/nls/loc/locales             # Link to /usr/lib/nls/loc/locales.2
/usr/lib/nls/loc/methods.1           # PA32 versioned 10.20 locale methods
/usr/lib/nls/loc/methods.2           # PA32 versioned 11.x locale methods
/usr/lib/nls/loc/methods             # Link to /usr/lib/nls/loc/methods.2
/usr/lib/nls/iconv/methods.1         # PA32 versioned 10.20 iconv method
                                     # libraries
/usr/lib/nls/iconv/methods.2         # PA32 versioned 11.x iconv method
                                     # libraries
/usr/lib/nls/iconv/methods           # Link to /usr/lib/nls/iconv/methods.2

/usr/lib/nls/loc/pa20_64/            # PA64 locale directory
/usr/lib/nls/loc/pa20_64/locales.2   # PA64 locale libraries
/usr/lib/nls/loc/pa20_64/locales     # Link to
                                     # /usr/lib/nls/loc/pa20_64/locales.2
/usr/lib/nls/loc/pa20_64/methods.2   # PA64 locale methods
/usr/lib/nls/loc/pa20_64/methods     # Link to
                                     # /usr/lib/nls/loc/pa20_64/methods.2
/usr/lib/nls/iconv/pa20_64/methods.2 # PA64 iconv method libraries
/usr/lib/nls/iconv/pa20_64/methods   # Link to
                                     # /usr/lib/nls/iconv/pa20_64/methods.2

New directories have been created for 32-bit and 64-bit IPF locale libraries, which co-exist with PA libraries. The new directories are:

/usr/lib/nls/loc/hpux32/
/usr/lib/nls/loc/hpux32/locales.1    # IA-64 native 32 bit locales
/usr/lib/nls/loc/hpux32/locales      # Link to /usr/lib/nls/loc/hpux32/locales.1
/usr/lib/nls/loc/hpux32/methods.1    # IA-64 native 32 bit methods
/usr/lib/nls/loc/hpux32/methods      # Link to /usr/lib/nls/loc/hpux32/methods.1
/usr/lib/nls/iconv/hpux32/methods.1  # IA-64 native 32 bit iconv libraries
/usr/lib/nls/iconv/hpux32/methods    # Link to
                                     # /usr/lib/nls/iconv/hpux32/methods.1

/usr/lib/nls/loc/hpux64/
/usr/lib/nls/loc/hpux64/locales.1    # IA-64 native 64 bit locales
/usr/lib/nls/loc/hpux64/locales      # Link to /usr/lib/nls/loc/hpux64/locales.1
/usr/lib/nls/loc/hpux64/methods.1    # IA-64 native 64 bit methods
/usr/lib/nls/loc/hpux64/methods      # Link to /usr/lib/nls/loc/hpux64/methods.1
/usr/lib/nls/iconv/hpux64/methods.1  # IA-64 native 64 bit iconv libraries
/usr/lib/nls/iconv/hpux64/methods    # Link to
                                     # /usr/lib/nls/iconv/hpux64/methods.1

Changes to locale Command

Locales are listed according to the underlying processor type if the -a option of the locale command is specified. The -a option is used as follows:

-a

list 32-bit IPF locales

-a 32

list 32-bit IPF locales

-a 64

list 64-bit IPF locales

-pa32

list 32-bit PA locale libraries in /usr/lib/nls/loc/locales.2

-pa64

list 64-bit IPF locale libraries in /usr/lib/nls/loc/pa20_64/locales.2

A new option, -A lists all the locale libraries irrespective of the flavors and versions. This list includes locales in the directories

/usr/lib/nls/loc/locales.2 /usr/lib/nls/loc/pa20_64/locales.2 /usr/lib/nls/loc/hpux32/locales.1 /usr/lib/nls/loc/hpux64/locales.1

Changes to localedef Command

Beginning in 11.0, localedef builds both 32-bit and 64-bit locale libraries on 64-bit systems, and only 32-bit libraries on 32-bit systems. On Itanium-based systems, both 32-bit and 64-bit libraries will be built. The libraries are installed as described in “Directory Structure Changes”.

There are slight differences in method files due to the different paths for methods on PA and IPF systems.

Method file format for PA systems:

# method file for univ.utf8 locale
METHODS
mblen      "__mblen_utf8"    "/usr/lib/nls/loc/methods.2" "utf8"
mbtowc     "__mbtowc_utf8"   "/usr/lib/nls/loc/methods.2" "utf8"
mbstowcs   "__mbstowcs_utf8" "/usr/lib/nls/loc/methods.2" "utf8"
wctomb     "__wctomb_utf8"   "/usr/lib/nls/loc/methods.2" "utf8"
wcwidth    "__wcwidth_utf8"  "/usr/lib/nls/loc/methods.2" "utf8"
wcswidth   "__wcswidth_utf8" "/usr/lib/nls/loc/methods.2" "utf8"
wcstombs   "__wcstombs_utf8" "/usr/lib/nls/loc/methods.2" "utf8"
__mbtopc   "__mbtopc_utf8"   "/usr/lib/nls/loc/methods.2" "utf8"
__pctomb   "__pctomb_utf8"   "/usr/lib/nls/loc/methods.2" "utf8"
__mbstopcs "__mbstopcs_utf8" "/usr/lib/nls/loc/methods.2" "utf8"
__pcstombs "__pcstombs_utf8" "/usr/lib/nls/loc/methods.2" "utf8"
END METHODS

Method file format for IPF systems:

# method file for univ.utf8 locale
METHODS
mblen      "__mblen_utf8"    "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
mbtowc     "__mbtowc_utf8"   "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
mbstowcs   "__mbstowcs_utf8" "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
wctomb     "__wctomb_utf8"   "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
wcwidth    "__wcwidth_utf8"  "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
wcswidth   "__wcswidth_utf8" "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
wcstombs   "__wcstombs_utf8" "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
__mbtopc   "__mbtopc_utf8"   "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
__pctomb   "__pctomb_utf8"   "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
__mbstopcs "__mbstopcs_utf8" "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
__pcstombs "__pcstombs_utf8" "/usr/lib/nls/loc/hpux32/methods.1" "utf8"
END METHODS

locale and localedef Compatibility

The default behavior of the locale command on IPF systems lists IA locales instead of PA locales. PA applications that list PA locales will see different results on IPF and PA systems.

The localedef command will not be able to generate PA locales on an Itanium-based system. If you need PA locales, build them on a PA system and move them to the Itanium-based system.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2001 Hewlett-Packard Development Company, L.P.