NEWLOCALE and NEWCODESET connection properties

You can use the NEWLOCALE and NEWCODESET connection properties to specify a locale or code set that is not mapped in the internal tables of the JDBC driver.

HCL OneDB™ JDBC Driver uses the IBM Software Development Kit (SDK) for Java™ globalization API to manipulate international data. The classes and methods in this API take a Java SDK locale or encoding as a parameter. Because the HCL OneDB DB_LOCALE and CLIENT_LOCALE properties specify the locale and code set based on HCL OneDB names, these HCL OneDB names are mapped to the Java SDK names. For example, the HCL OneDB name for the ASCII code set is 8859-1 and the Java SDK name for the ASCII code set is 8859_1. OneDB JDBC Driver internally maps 8859-1 to 8859_1 and uses the appropriate name in the Java SDK classes and methods.

Use the NEWLOCALE and NEWCODESET connection properties to specify a locale or code set that is not mapped in the internal tables of the JDBC driver.

The NEWLOCALE and NEWCODESET properties have the following formats:
NEWLOCALE=<Java SDK locale>,<Ifx locale>:<Java SDK locale>,<Ifx locale>...
NEWCODESET=<Java SDK encoding>,<Ifx codeset name>,
<Ifx codeset number>:<Java SDK encoding>,<Ifx codeset name>,<Ifx codeset number>...
The following example shows a URL that uses these properties. (You must specify a valid URL on a single line.)
jdbc:informix-sqli://myhost:1533:informixserver=myserver;user=myname;
password=mypasswd;NEWLOCALE=en_us,en_us;NEWCODESET=8859_1,8859-1,819;

There is no limit to the number of locale or code-set mappings that you can specify. If you specify an incorrect number of parameters or values, you get a message that says “Locale Not Supported” or “Encoding or Code Set Not Supported.” If you set these properties in the URL or in an IfmxDataSource object, the values in NEWLOCALE and NEWCODESET override the values in the JDBC internal tables. For example, if JDBC already maps 8859-1 to 8859_1, but you specify NEWCODESET=8888,8859-1,819, the new value, 8888, is used for the code-set conversion.