Enabling code set conversion between replicates

You can enable code set conversion to allow replication of data between servers that use different code sets.

Prerequisites:

The table and column names must contain ASCII characters to convert a non-master replicate to a master replicate.

The servers must have UTF-8 code set transaction support enabled to replicate between server versions.

The target schema must allow for expansion due to code set conversion. For example, a CHAR(10) column in one code set might require 40 bytes in the converted code set.

When code set conversion is enabled, character columns of the following data types are converted to UTF-8 (Unicode) when the row is copied into the transmission queue.

  • CHAR
  • VARCHAR
  • NCHAR
  • NVARCHAR
  • LVARCHAR
  • TEXT
  • CLOB

When the replicated row is applied on the target server, the data is converted from UTF-8 to the code set that is used on the target server. No attempt is made to convert character data contained within opaque data types, such as TimeSeries data types, user-defined data types, or DataBlade module data types.

To enable code set conversion between replicates, include the --UTF8=y option in your replicate definition.

To use the latest version of the Unicode library, set the GL_USEGLU environment variable in your server environment. The GL_USEGLU environment variable must be set to a value of 1 (one) in the database server environment before the server is started, and before the database is created.

If your table names or column names contain non-ASCII characters, you must manually create a shadow replicate and then swap the shadow replicate with the primary replicate using the cdr swap shadow command.

The autocreate option is not supported for replicates defined with --UTF8=y option when using the cdr realize template or cdr change replicate commands.

Code set conversion with the GLS library requires only those code set conversion files found in the INFORMIXDIR/gls/cv9 directory.
  • For US English, locales are handled automatically by the IBM® Informix® Client Software Development Kit installation and setup.
  • For other locales, you might need to explicitly provide the locale and conversion files.