Informix
Informix Online Documentation

DOCUMENTATION NOTES FOR

Informix Guide to GLS Functionality

Date: 05/22/00

Version: 3.08


Table of Contents

I. Overview
II. Informix Database Server Names
III. Java Support
IV. Glossary
V. Inserting Localized Exception Messages from a C UDR
VI. Unicode Universal Code Set (UCS) and Informix GLS

I. Overview

This document describes feature and performance topics not covered in the Informix Guide to GLS Functionality or modified since publication.


II. Informix Database Server Names

This manual might not reflect the latest names of Informix database servers. The following table lists the database server versions and their corresponding names.

 
Database Server Version Numbers Database Server Names
5.x INFORMIX-OnLine and INFORMIX-SE

7.1x, 7.2x INFORMIX-OnLine Dynamic Server and INFORMIX-SE

7.3x Informix Dynamic Server

8.1x INFORMIX-OnLine XPS

8.2x Informix Dynamic Server with Advanced Decision Support and Extended Parallel Options

8.3 Informix Extended Parallel Server (XPS) or Informix Enterprise Decision Server

9.01, 9.1 through 9.13 INFORMIX-Universal Server

9.14 Informix Dynamic Server with Universal Data Option

9.2 Informix Dynamic Server 2000


III. Java Support

Informix Internet Foundation 2000 provides support for the following Informix GLS environment varaibles: CLIENT_LOCALE, DB_LOCALE, GL_DATE, and DBCENTURY. Informix Internet Foundation 2000 also provides support for the following Informix GLS properties: GL_DATETIME and DB_TIME. For information about Informix Internet Foundation 2000 and using these environment variables with Java, see the documentation notes for Creating UDRs in Java.


IV. Glossary

The glossary that was formerly in the Informix Guide to GLS Functionality is now in the Informix Guide to SQL: Reference.


V. Inserting Localized Exception Messages from a C UDR

To create messages for exceptions raised within UDRs (with mi_db_error_raise()), insert them in the syserrors system catalog table. For more information, see "Internationalized Exception Messages" on page 4-17 of the 9.2 Informix Guide to GLS Functionality. However, to insert these messages, the locale of the message text must match the server-processing locale. If these locales are different, use of an SQL script or a UDR (with mi_exec()) to insert the messages is not reliable. The SQL parser triggers an error condition when it encounters characters that it does not recognize.

To bypass this restriction, you can use a UDR that prepares the INSERT statement (with mi_prepare()) to load the error messages. In the prepared INSERT statement:

For example, the following line prepares an INSERT statement for messages in the default locale of U.S. English (en_us) on a UNIX system:

To execute this prepared INSERT statement, provide values for the placeholders (sqlstate and message) and then use the mi_exec_prepared_statement() function to send the INSERT to the database server. (For more information on sending SQL statements with mi_exec_prepared_statement(), see "Executing Prepared SQL Statements" on page 8-16 of the 9.2 Informix DataBlade API Programmer's Manual.

The following UDR code uses a message array (enus_msg) to hold the SQLSTATE values and their associated message text. It puts information about each element of this message array in the approrpriate placeholder arrays (args, lens, nulls, and types) of the mi_exec_prepared_statement() function.


VI. Unicode Universal Code Set (UCS) and Informix GLS

To store data from more than one non-English language in one database, you can either use the GLS implementation of the UTF-8 UCS GLS locale and code set conversion files, or use the Unicode UCS in your database. To use Unicode with Informix GLS, you must be using Informix Dynamic Server with Universal Data Option (IDS/UD) Version 9.1x or above, and the Informix Unicode DataBlade module. The Unicode DataBlade module enables users to store data in native Unicode format in a database and to access and manipulate that data. For more information, see the Informix Unicode DataBlade Module User's Guide.



Copyright © 2000, Informix Software, Inc. All rights reserved