Background documentationUnicode Locate this document in the navigation structure

 

Unicode is an international standard character set. The Unicode character set provides a unique representation for all characters used in alphabets. The ASCII character set, on the other hand, is suited only for use with English and Central European characters.

SAP MaxDB supports Unicode according to ISO 10646. Internally, the database system stores Unicode data in UTF-16/UCS-2 format. This requires twice as much storage space as saving the data in ASCII format, since the coding is 16-bit rather than 8.

You can use Unicode for the database catalog and for application data.

  • Database catalog:

    In database versions prior to and including 7.6 you can select whether the database catalog is saved in Unicode or ASCII. From Version 7.7 the database catalog is always saved in Unicode.

    For more information about migrating your database, see your installation and upgrade documentation.

  • Application data:

    To store application data of a CHAR, VARCHAR or LOB type column in Unicode, select UNICODE as code attribute for the column.

    To configure UNICODE as default code attribute for all CHAR, VARCHAR and LOB data type columns, select UNICODE for the DefaultCodePage special database parameter.

    The following requirements must be met so that the code attribute can be changed for a column that already contains data:

    • ASCII -> Unicode: All values in the column still fit into the column after conversion (Unicode data requires twice as much space as ASCII data).

    • Unicode -> ASCII: The values contain only characters that are part of the ASCII character set.

Which Database Tools Support Unicode?

Database Tool

Unicode Supported*

Database Studio

Yes

Database Manager

Yes

Loader

Yes

SQLCLI

No

XUSER

Limited

You can import user names and passwords from a file into XUSER in Unicode only by using option -b, but you cannot enter them directly on the command line.

* Note when using command line programs that the command line environment must also support Unicode.

Which Interfaces Support Unicode?

Interface

Unicode Supported

JDBC

Yes

ODBC

Yes

Perl

Yes

PHP

No

Python

Yes

SQLDBC

Yes

WebDAV

Yes

More Information

SQL Reference Manual, Code Attribute