unicode

Enable or disable Unicode support in the MQL connector.

USYS$MQL_PARAMSunicode= on | off

Value

Meaning

on

Fields with wide character packing codes (such as W40, W*, SW100) are mapped to the MySQL utf8 character set, and the default character set used for communicating with the MySQL Server also becomes utf8.

off

Wide packing code fields are mapped to the C packing code, the default character set. (Default).

Unicode characters can be stored but the number of characters stored will depend on how many bytes each character has occupied in the field.

Description

Unicode support is disabled by default (if this setting is not specified) or if unicode is set off.

With unicode=on, when a table is created on-the-fly or when creating an SQL script, wide-character columns are explicitly defined as using the utf8 character set. This ensures that these fields remain as UTF-8 Unicode fields, regardless of the default character set in use at the time.

Unicode Databases

For a MySQL database that uses the utf8 character set, you should also set $DEF_CHARSET=UTF8. This ensures that when unicode=on, Unicode characters can also be used in:

  • Table names and column names

  • User names and passwords

  • SQL Workbench and the sql ProcScript statement

Non-Unicode Databases

For a non-Unicode database, Unicode allows wide-character fields to be created using the utf8 character set, so a W10 field will be able to hold 10 Unicode characters. However, it is not possible to use Unicode in table and columns names, user names and passwords, the SQL Workbench, or the sql ProcScript statement.

Related Topics