Home | Previous Page | Next Page   Internationalization and Date Formats > Support for Code-Set Conversion >

Unicode to Database Code Set

Java is Unicode based, so IBM Informix JDBC Driver converts data between Unicode and the Informix database code set. The code-set conversion value is extracted from the DB_LOCALE value specified at the time the connection is made. If this DB_LOCALE value is incorrect, the database locale (stored in the database systables catalog) is used in the connection and in the code-set conversion.

The DB_LOCALE value must be a valid Informix locale, with a valid Informix code-set name or number as shown in the compatibility table that follows. The following table maps the supported JDK 1.2 encodings to Informix code sets.

Informix Code Set Name Informix Code Set Number JDK Code Set
8859-1 819 8859_1
8859-2 912 8859_2
8859-3 57346 8859_3
8859-4 57347 8859_4
8859-5 915 8859_5
8859-6 1089 8859_6
8859-7 813 8859_7
8859-8 916 8859_8
8859-9 920 8859_9
ASCII 364 ASCII
sjis-s 932 SJIS
sjis 57350 SJIS
utf8 57372 UTF8
big5 57352 Big5
CP1250 1250 Cp1250
CP1251 1251 Cp1251
CP1252 1252 Cp1252
CP1253 1253 Cp1253
CP1254 1254 Cp1254
CP1255 1255 Cp1255
CP1256 1256 Cp1256
CP1257 1257 Cp1257
cp949 57356 Cp949
KS5601 57356 Cp949
ksc 57356 Cp949
ujis 57351 EUC_JP
gb 57357 ISO2022CN_GB
GB2312-80 57357 ISO2022CN_GB
cp936 57357 ISO2022CN_GB

You cannot use an Informix locale with a code set for which there is no JDK-supported encoding. This incorrect usage results in an Encoding not supported error message.

If the connection is made but the database server returns a warning of a mismatch between the DB_LOCALE value sent and the real value in the database systables catalog, the correct database locale is automatically extracted from the systables catalog, and the client uses the correct JDK encoding for the connection.

The following table shows the supported locales.

Supported Locales
ar_ae ar_bh ar_kw ar_om ar_qa
ar_sa bg_bg ca_es cs_cz da_dk
de_at de_ch de_de el_gr en_au
en_ca en_gb en_ie en_nz en_us
es_ar es_bo es_cl es_co es_cr
es_ec es_es es_gt es_mx es_pa
es_pe es_py es_sv es_uy es_ve
fi_fi fr_be fr_ca fr_ch fr_fr
hr_hr hu_hu is_is it_ch it_it
iw_il ja_jp ko_kr mk_mk nl_be
nl_nl no_no pl_pl pt_br pt_pt
ro_ro ru_ru sh_yu sk_sk sv_se
th_th tr_tr uk_ua zh_cn zh_tw
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]