Handle locale-sensitive data (GLS)
the HCL OneDB™ database has a fixed locale per database. This locale, the database locale, is attached to the database at the time that the database is created. In any given database, all character data types (such as CHAR, NCHAR, VARCHAR, NVARCHAR, and TEXT) contain data in the code set that the database locale supports.
However, using the SQL statement SET COLLATION you can specify the collation order to use at runtime, which is independent of the locale used to store data in the database, and lasts for the duration of the session. You can use the mi_get_db_locale() function to determine which locale a user has set for the collation order in a session. If the user has not changed the collation, mi_get_db_locale() returns the default database locale. See the HCL OneDB Guide to SQL: Syntax for information about the SET COLLATION statement. See the HCL OneDB DataBlade® API Function Reference for information about the mi_get_db_locale() function.
- The input and output support functions provide the ability to transfer the external representation of the opaque type.
- The receive and send support functions provide the ability to transfer the internal representation of the opaque type.
- At the client side of the connection, the client application must
handle the locale-sensitive data for opaque-type columns correctly.
It must also have the CLIENT_LOCALE environment variable set correctly.
- At the database server side of the connection, you must ensure
that the appropriate support functions handle the locale-sensitive
data.
In addition, the DB_LOCALE and SERVER_LOCALE environment variables must be set correctly.
For more information about the CLIENT_LOCALE, DB_LOCALE, and SERVER_LOCALE environment variables, see the HCL OneDB GLS User's Guide.
- Functions to manipulate locale-sensitive data in a portable fashion
- Functions to handle single-byte and multibyte character access
- Functions to manipulate other locale-sensitive data, such as the end-user formats of date, time, or monetary data
For an overview of the GLS API, see the HCL OneDB GLS User's Guide. For a description of the GLS API functions, see the HCL OneDB GLS User's Guide.