Home | Previous Page | Next Page   GLS Environment Variables > GLS-Related Environment Variables >

GLS8BITFSYS

Use the GLS8BITFSYS environment variable to tell IBM Informix products (such as the ESQL/C processor) whether the operating system is 8-bit clean. This setting determines whether an IBM Informix product can use non-ASCII characters in the filename of an operating-system file that it generates.

Read syntax diagramSkip visual syntax diagram>>-GLS8BITFSYS--+-0-+------------------------------------------><
                '-1-'
 
Element
Description
0
IBM Informix products assume that the operating system is not 8-bit clean and generate filenames with 7-bit ASCII characters only.
1
IBM Informix products assume that the operating system is 8-bit clean and can use non-ASCII characters (8-bit or multibyte characters) in the filename of an operating-system file that it generates.

If you include non-ASCII characters in a filename that you specify within a client application, you must ensure that the code set of the server-processing locale supports these non-ASCII characters. If you do not set GLS8BITFSYS, Informix database servers behave as if GLS8BITFSYS is set to 1.

For example, create a database that is called A1A2B1B2, where A1A2 and B1B2 are multibyte characters, with the following SQL statement:

CREATE DATABASE A1A2B1B2

If GLS8BITFSYS is 1 (or is not set) on the server computer, the database server assumes that the operating system is 8-bit clean, and it generates a database directory, A1A2B1B2.dbs.

If GLS8BITFSYS is set to 0 on the server computer and you include non-ASCII characters in the filename, the IBM Informix product uses an internal algorithm to convert these non-ASCII characters to ASCII characters. The filenames that result are 7-bit clean.

Filenames with invalid byte sequences generate errors when they are used with GLS-based products.

Only some database utilities, such as dbexport, and the compilers for IBM Informix ESQL/C products use GLS8BITFSYS on the client computer to create and use files. For example, suppose you compile an ESQL/C source file that is called A1A2B1B2.ec, where A1A2 and B1B2 are multibyte characters. If GLS8BITFSYS is set to 1 (or is not set) on the client computer, the ESQL/C processor generates an intermediate C file that is called A1A2B1B2.c. For a list of ESQL/C files that check GLS8BITFSYS, see Handling Non-ASCII Characters.

Restrictions on Non-ASCII Filenames

If your locale supports a code set with non-ASCII characters, restrictions apply to filenames for operating-system files that IBM Informix products generate. Before you or an IBM Informix product creates a file and assigns a filename, consider the following questions:

Making Sure That Your Operating System Is 8-Bit Clean

To support non-ASCII characters in filenames, your operating system must be 8-bit clean. An operating system is 8-bit clean if it reads the eighth bit as part of the code value. In other words, the operating system must not ignore or make its own interpretation of the value of the eighth bit.

Consult your operating-system manual or system administrator to determine whether your operating system is 8-bit clean before you decide to use a nondefault locale that contains non-ASCII characters in filenames that IBM Informix products use and generate.

Making Sure That Your Product Supports the Same Code Set

Once an IBM Informix product has generated an operating-system file whose filename has non-ASCII characters, it has written that filename and the file contents in a particular code set. Whenever an IBM Informix product or client application needs to access that file, you must ensure that the product uses a server-processing locale that supports that same code set.

The Server Code Set

When the database server creates a file whose filename contains non-ASCII characters, the server locale must support these characters. Before you start a database 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 message log with the UNIX path /A1A2B1B2/C1C2D1D2, where A1A2, B1B2, C1C2, and D1D2 are multibyte characters in the Japanese SJIS code set. To enable the database server to create this message-log file on its computer:

  1. Modify the MSGPATH parameter in the ONCONFIG file.

    For UNIX:

    MSGPATH /A1A2B1B2/C1C2D1D2   
    # multibyte message-log filename 

    For Windows:

    MSGPATH \A1A2B1B2\C1C2D1D2   
    # multibyte message-log filename 
  2. Set the SERVER_LOCALE environment variable on the server computer to the Japanese SJIS locale, ja_jp.sjis.
  3. Start the database server with the oninit utility.

When the database server initializes, it assumes that the operating system is 8-bit clean and creates the /A1A2B1B2/C1C2D1D2 message log on UNIX, or the \A1A2B1B2\C1C2D1D2 file on Windows.

The Client Code Set

When an ESQL/C processor creates a file whose filename has non-ASCII characters, the client locale must support these non-ASCII characters. Before you start an Informix database server, you must ensure that the code set of the client locale (the client code set) contains these characters.

When you use a nondefault locale, you must set the CLIENT_LOCALE environment variable to the name of a locale whose code set contains these non-ASCII characters.

For example, suppose you want to process an ESQL/C source file 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 the esql command to create the intermediate C source file on the client computer:

  1. Set the CLIENT_LOCALE environment variable on the client computer to the Japanese SJIS locale, ja_jp.sjis.
  2. Process the ESQL/C source file with the esql command.

If the code sets that are associated with the filename and with the client locale do not match, a valid filename might contain illegal characters with respect to the client locale. The ESQL/C processor rejects any filename that contains illegal characters and displays the following error message:

Illegal characters in filename.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]