INFORMIX
Informix Guide to GLS Functionality
Chapter 4: INFORMIX-Universal Server Features
Home Contents Index Master Index New Book

Using the Server Locale

Universal Server might perform read and write operations to the following operating-system files:

    Universal Server generates diagnostic files when you set one or more of the following configuration parameters: DUMPCNT, DUMPCORE, DUMPDIR, DUMPGCORE, and DUMPSHMEM. Diagnostic files include the af.*, shmem.xxx, gcore.xxx, and core files. For more information on these files, refer to the INFORMIX-Universal Server Administrator's Guide.

    Universal Server generates a user-specified message-log file when you set the MSGPATH configuration parameter.

Tip: For more information on diagnostic files, message logs, and configuration parameters, see the "INFORMIX-Universal Server Administrator's Guide."
These operating-system files reside on the server computer, the same computer on which Universal Server resides. When Universal Server reads from or writes to these files, it must use a code set that the server computer supports. Universal Server obtains this code set from the server locale. You set the server locale with the SERVER_LOCALE environment variable. If you do not set SERVER_LOCALE, Universal Server uses the default locale, U.S. English, as the server locale. For the definition of server locale, see page 1-27. For information on how to set SERVER_LOCALE, see page 2-41.

Universal Server needs to determine the code set that the server locale supports (the server code set) to perform the following tasks that are associated with the read/write operations to its operating-system files:

Generating Non-ASCII Filenames

You can use non-ASCII characters (8-bit and multibyte characters) when you create or refer to any of the following Universal Server names:

The following restrictions affect the ability of Universal Server to generate filenames that contain non-ASCII characters:

The GLS8BITFSYS Environment Variable

The GLS8BITFSYS environment variable on the server computer tells Universal Server whether the operating system is 8-bit clean. Universal Server uses the value of GLS8BITFSYS to determine whether it can use non-ASCII characters in the filename of an operating-system file that it generates, as follows:

For example, the MSGPATH configuration parameter specifies a filename for a Universal Server message log. Suppose you specify a Universal Server message log that is called /A1A2B1B2/C1C2D1D2, where A1A2, B1B2, C1C2, and D1D2 are multibyte characters, with the configuration parameter in your ONCONFIG configuration file that Figure 4-1 shows.

Figure 4-1
Message-Log Filename with Multibyte Characters

If GLS8BITFSYS is 1 (or is not set) on the server computer, Universal Server assumes that the operating system is 8-bit clean, and it generates a file that is called C1C2D1D2 in the /A1A2B1B2 directory. For more information on an 8-bit clean operating system and the GLS8BITFSYS environment variable, see page 2-23.

The Server Code Set

When Universal Server actually creates a file whose filename has non-ASCII characters, the server locale must support these non-ASCII characters. Before you start Universal Server, you must set the SERVER_LOCALE environment variable to the name of a locale whose code set contains these non-ASCII characters.

For example, suppose you want a Universal Server message log with the path /A1A2B1B2/C1C2D1D2, where A1A2, B1B2, C1C2, and D1D2 are multibyte characters in the Japanese SJIS code set. You must perform the following steps to enable Universal Server to create this message-log file on the server computer:

1. Modify the MSGPATH configuration parameter in the ONCONFIG file, as the example in Figure 4-1 shows.

    2. Set the SERVER_LOCALE environment variable on the server computer to the Japanese SJIS locale, ja_jp.sjis.

    3. Start Universal Server with the oninit utility.

When Universal Server initializes, it creates the /A1A2B1B2/C1C2D1D2 message log. For more information on oninit, see the INFORMIX-Universal Server Administrator's Guide.

Performing Code-Set Conversion

Once Universal Server creates the operating-system file, it has generated a filename and written file contents in the code set of the server locale (the server code set). Any Informix product or client application that needs to access this file must have a server-processing locale that supports this same server code set. You must ensure that the appropriate locale environment variables are set so that the server-processing locale supports a code set with these non-ASCII characters. (For more information on the server-processing locale, see page 1-34.)

Universal Server checks the validity of a filename with respect to the server-processing locale before it references a filename. When Universal Server transfers data to and from its operating-system files, it handles any differences in the code sets of the server-processing locale and the server locale, as follows:

    If Universal Server reads from or writes to an operating-system file for which no code-set conversion exists, it uses the code set of the server-processing locale to perform the read or write operation.

Which Data Does Universal Server Convert?

When the code sets of two locales differ, an Informix client product must use code-set conversion to prevent data corruption of character data. Code-set conversion converts the following types of character data:

Tip: If your ESQL/C client application uses code-set conversion, you might need to take special programming steps. For more information, see "Handling Code-Set Conversion".
For more information on code-set conversion, see page 1-40.




Informix Guide to GLS Functionality, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.