Home | Previous Page | Next Page   Unicode >

Unicode in an ODBC Application

The following diagram shows the architecture of a typical ODBC application using a driver manager and the IBM Informix ODBC Driver.

Figure 9. Typical ODBC Application Architecture
This graphic illustrates a typical ODBC Application architecture. The illustration is composed of four boxes arranged in a horizontal line and connected by three dual-directional arrows. The box on the left is labeled "Application" and has the phrase "ANSI or Unicode" underneath it. The "Application" box is connected to a box labeled "Driver Manager DMR" which is connected to a box labeled  "IBM Informix ODBCDriver.: The "IBM Informix ODBCDriver" box is connected to the fourth box which is labeled "Database." the "Database box has the phrase "{UTF-8} or other locale" beneath it.

In this scenario, if an application is making calls to Unicode enabled APIs, then it must be connected to a Unicode enabled IBM Informix ODBC Driver (Version 3.8 and later) to ensure there is no loss of data. If the application is making calls to ANSI ODBC APIs, the application can be linked to either a Unicode enabled driver or an ANSI driver.

Note that the IBM Informix ODBC Driver continues to support IBM Informix GLS. Hence all data fetched in character buffers will be fetched in the client locale codeset. Only data fetched using wide character buffers will use Unicode.

On Windows, if the ODBC driver is not Unicode enabled, the ODBC Driver Manager maps all Unicode API function calls to ANSI ODBC APIs.

If the ODBC driver is Unicode enabled, the Windows ODBC driver manager (Version 3.5 or later) maps all ANSI ODBC APIs to Unicode ODBC APIs. The Data Direct (formerly Merant) driver manager for UNIX also works this way.

Important:
In CSDK Version 2.70 there are two ODBC Drivers. One with only ANSI APIs (called ANSI ODBC Driver, Version 3.34) and another with both ANSI and UNICODE APIs (called Unicode ODBC Driver, Version 3.80). For CSDK 2.80 and later, there is only one ODBC Driver that supports both ANSI and UNICODE APIs.

Important:
The IBM Informix Driver Manager Replacement (DMR) for UNIX platforms does not map between Unicode and ANSI APIs.

For details about how the Windows ODBC driver manager handles mapping, please refer to the following URL:

http://msdn.microsoft.com/library/en-us/odbc/htm
/odbcfunction_mapping_in_the_driver_manager.asp
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]