Configuring and operating GT.M with Unicode® support (optional)

The configure script provides the option to install GT.M with or without Unicode® support for encoding international character sets. This section describes the system environment required to install and operate GT.M with Unicode support. Users who handle data in ASCII or other single-byte character sets such as one of the ISO-8859 representations and do not foresee any use of character sets beyond single byte character sets, may proceed to the next section.

M mode and UTF-8 mode

A GT.M process can operate in either M mode or UTF-8 mode. In certain circumstances, both M mode and UTF-8 mode may concurrently access the same database.

$gtm_chset determines the mode in which a process operates. If it has a value of M, GT.M treats all 256 combinations of the 8 bits in a byte as a character, which is suitable for many single-language applications.

If $gtm_chset has a value of UTF-8, GT.M (at process startup) interprets strings as being encoded in UTF-8. In this mode, all functionality related to Unicode® support becomes available and standard string-oriented operations operate with UTF-8 encoding. In this mode, GT.M detects character boundaries (since the size of a character is variable length), calculates glyph display width, and performs string conversion between UTF-8 and UTF-16.

If you install GT.M with Unicode support, all GT.M components related to M mode reside in your GT.M distribution directory and Unicode support related components reside in the utf8 subdirectory of your GT.M distribution. For processes in UTF-8 mode, in addition to gtm_chset, ensure that $gtm_dist points to the utf8 subdirectory, that $gtmroutines includes the utf8 subdirectory (or the libgtmutil.so therein) rather than its parent directory.

In addition to $gtm_chset, GT.M V5.3-004 and up use $gtm_icu_version to choose an ICU library library version other than the default. For ICU libraries built with symbol renaming enabled, $gtm_icu_version becomes a required setting.

$gtm_icu_version specifies the ICU version that GT.M should use for UTF-8 operations. It is in the form of MajorVersion.MinorVersion where MajorVersion and MinorVersion specify the desired Major verion and Minor version of ICU. For example, 3.6 refers to ICU version 3.6. If $gtm_icu_version is defined, GT.M works regardless of whether or not symbols are renamed in ICU. If $gtm_icu_version is not defined or does not evaluate to an installed ICU version, GT.M look for non-renamed symbols in the default ICU version. Note that display widths for a few characters are different starting in ICU 4.0.

GT.M versions V5.2-000 to V5.3-003 required ICU 3.6 libraries. These versions did not use $gtm_icu_version. The following table lists GT.M versions and their compatibility with the operating system provided ICU libraries.

Operating System

Supported GT.M Versions

Compatibility with OS provided ICU libraries

Define $gtm_icu_version?

AIX 7

GT.M V5.4-001 and up

GT.M can use the AIX provided ICU libraries which are compiled without symbol renaming.

N

AIX 6

GT.M V5.3-004 until GT.M V6.2-002A

GT.M cannot use the AIX provided ICU libraries. Please build and install an appropriate ICU version and define the gtm_icu_version environment variable accordingly.

Y

GT.M V6.3-000 and up

GT.M can use the AIX provided ICU libraries which are compiled without symbol renaming.

N

Linux (RHEL 6+, SLES 11+, Ubuntu 12.04+)

GT.M V5.3-004 to GT.M V5.4-001

GT.M can use the Linux distribution provided ICU libraries from ICU 3.6 until ICU 4.2. These libraries are compiled with symbol renaming.

Y

GT.M V5.4-002 and up

GT.M can use the Linux distribution provided ICU libraries. These libraries are compiled with symbol renaming.

Y

[Note] Note

The gtmprofile script defines $gtm_icu_version as necessary.

Compiling ICU

GT.M uses ICU 3.6 (or above) to perform operations related to Unicode® support. GT.M generates the distribution for UTF-8 mode only if ICU 3.6 (or above) is installed on the system. Therefore, install an appropriate ICU version before installing GT.M to perform functionality related to Unicode support.

Note that the ICU installation instructions may not be the same for every platform. If libicu has been compiled with symbol renaming enabled, GT.M requires $gtm_icu_version be explicitly set. Please see the above section for more information.

After installing ICU 3.6 (or above), you also need to set the following environment variables to an appropriate value.

  1. LC_CTYPE

  2. LC_ALL

  3. LD_LIBRARY_PATH

  4. TERM