skip to main content
Internationalization, localization, and Unicode : Unicode and non-Unicode ODBC drivers : Function calls : Unicode application with a Unicode driver
  

Try DataDirect Drivers Now
Unicode application with a Unicode driver
An operation involving a Unicode application and a Unicode driver that use the same Unicode encoding is efficient because no function conversion is involved. If the application and the driver each use different types of encoding, there is some conversion overhead. See "Driver Manager and Unicode Encoding on UNIX/Linux" for details.

Windows iconWindows

1. The Unicode application sends UCS-2 or UTF-16 function calls to the Driver Manager.
2. The Driver Manager does not have to convert the UCS-2/UTF-16 function calls to ANSI. It passes the Unicode function call to the Unicode driver.
3. The driver returns UCS-2/UTF-16 argument values to the Driver Manager.
4. The Driver Manager returns UCS-2/UTF-16 function calls to the application.

This information pertains to UNIX and Linux. UNIX and Linux

1. The Unicode application sends function calls to the Driver Manager. The Driver Manager expects the string arguments in these function calls to be UTF-8 or UTF-16 based on the value of the SQL_ATTR_APP_UNICODE_TYPE attribute. Note that the SQL_ATTR_APP_UNICODE_TYPE attribute can be set for the environment, using SQLSetEnvAttr, or the connection, using SQLSetConnectAttr.
2. The Driver Manager passes Unicode function calls to the Unicode driver. The Driver Manager has to perform function call conversions if the SQL_ATTR_APP_UNICODE_TYPE is different from the SQL_ATTR_DRIVER_UNICODE_TYPE.
3. The driver returns argument values to the Driver Manager. Whether these are UTF-8 or UTF-16 argument values is based on the value of the SQL_ATTR_DRIVER_UNICODE_TYPE attribute.
4. The Driver Manager returns appropriate function calls to the application based on the SQL_ATTR_APP_UNICODE_TYPE attribute value. The Driver Manager has to perform function call conversions if the SQL_ATTR_DRIVER_UNICODE_TYPE value is different from the SQL_ATTR_APP_UNICODE_TYPE value.

This information pertains to macOS.macOS

1. The Unicode application sends UTF-32 function calls to the Driver Manager.
2. The Driver Manager does not have to convert the UTF-32 function calls to ANSI. It passes the Unicode function call to the Unicode driver.
3. The driver returns UTF-32 argument values to the Driver Manager.
4. The Driver Manager returns UTF-32 function calls to the application.