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 11.0 - 11i Internationalization Features White Paper > Chapter 3 Locales

Building Locales for HP-UX 11.0 and HP-UX 11i

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

HP-UX 11.0 and HP-UX 11i systems can have up to three different flavors of the same locale:

  • 32-bit

  • 64-bit

  • HP-UX 10.20 compatibility 32-bit

The following sections present build requirements, briefly describe each flavor, and give the locale building procedure. The locale zh_CN.utf8 is used as an example.

Requirements

Compiler

Building locales on HP-UX requires a C compiler named “HP C/ANSI C Developer's Bundle for HP-UX”. Run the swlist command to verify that this compiler installed. Normally, this package is NOT shipped with HP-UX systems.

Source Files

All needed files are normally shipped with the system to the following paths:

charmaps

/usr/lib/nls/loc/charmaps/utf8.cm

method files

/usr/lib/nls/loc/locales/univ.utf8.m

locale source

/usr/lib/nls/loc/src/zh_CN.utf8.src

Kernel Configuration (needed for UTF8 locales only)

Building Unicode/UTF8 locales requires that the following kernel parameters be increased from 67 MB to 100 MB:

  • MAXDSIZ

  • MAXTSIZ

  • SHMMAX

The Three Locale Flavors

Using the build syntax shown, locales are built in the local directory. After a locale is built, copy it to the path shown.

32-bit Locales

  • Located at /usr/lib/nls/loc/locales.2/zh_CN.utf8

  • Used by 32-bit HP-UX 11.0 and HP-UX 11i applications

  • To build, run the following command on a 32-bit machine:

    localedef -C '+ESlit' -Q -L -x -Pcnf utf8.cm -m univ.utf8.m -i \
      zh_CN.utf8.src zh_CN.utf8 > zh_CN.out 2> zh_CN.err

64-bit Locales

  • This flavor is found on 64-bit systems only.

  • Located at /usr/lib/nls/loc/pa20_64/locales.2/zh_CN.utf8

  • Used by 64-bit HP-UX 11.0 and HP-UX 11i applications.

  • To build, run the following command on a 64-bit machine. This command produces 32- and 64-bit locales. The 64-bit locale is created under the ./pa20_64 directory.

    localedef -C '+ESlit' -Q -L -x -Pcnf utf8.cm -m univ.utf8.m -i \
      zh_CN.utf8.src zh_CN.utf8 > zh_CN.out 2> zh_CN.err

Compatibility 32-bit locales

  • Located at /usr/lib/nls/loc/locales.1/zh_CN.utf8.

  • Used by HP-UX 10.20 applications.

  • To build, run the following command on a 10.20 machine, and then copy the locale binary to the 11.0 or 11i system:

    localedef -C '+ESlit' -Q -L -x -Pcnf utf8.cm -m univ.utf8.m -i \
      zh_CN.utf8.src zh_CN.utf8 > zh_CN.out 2> zh_CN.err

Alternatives

There are options to build locales and get them installed immediately in the default locations. Refer to the localedef manpage for more information.

Locales under /usr/lib/nls/loc/locales.1 can be copied from a 10.20 machine.

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