SQL statements can contain both UNICODE literals and UNICODE identifiers. The prerequisite for implementing these SQL statements in a UNICODE-compliant database instance is a UNICODE-compliant client (C/C++ Precompiler, JDBC, ODBC, or the query tools SQL Studio and Web SQL Studio).
The database interfaces JDBC, ODBC, the C/C++ Precompiler, and Python support UNICODE.
Since Java works with UNICODE strings, it can read and write UNICODE columns. If you also want to use UNICODE in SQL statements, set the UNICODE CONNECT property to true. SQL statements are then transferred to the database instance in UTF-16/UCS-2 format.
See also Example
Depending on your operating system, take account of the following factors:
· Microsoft Windows
From Version 7.4.03.26, the database software includes both a UNICODE-compliant ODBC driver and a driver without UNICODE.
¡ The driver MaxDB (Unicode) (or SAP DB (Unicode)) corresponds to the previous driver SAP DB 7.4. It implements the UNICODE interface from ODBC (such as SQLConnectW) and communicates with a UNICODE-compliant database kernel using UNICODE only. It uses ASCII to communicate with a non-UNICODE-compliant kernel.
¡ The driver MaxDB (or SAP DB) implements the ASCII interface from ODBC (without Wide functions such as SQLConnectW) and uses only ASCII to communicate with the database kernel. This communication is more efficient (produces a smaller network load) and has fewer restrictions, for example, on the maximum length of SQL statements.
· UNIX/Linux
The use of the ODBC driver is currently not possible on platforms for which the standard UNICODE type WCHAR_T with four bytes is defined. The database and ODBC driver process UNICODE internally as values that are two bytes long.
Both the ANSI and UNICODE variants of the ODBC-API are defined in the driver.
Applications that do not require the functions of a driver manager can be linked statically with the ODBC driver.
You can work with UNICODE data. When a database session is opened, the C/C++ Precompiler checks whether the database is UNICODE-compliant.
Python 2.*: UNICODE columns can be read and written. UNICODE character strings cannot be used as SQL statements.
Python 1.5.2: UNICODE output values are converted to ASCII. If this conversion fails, an error is reported.