Unicode application with a non-Unicode driver
- Last Updated: January 6, 2022
- 2 minute read
- DataDirect Connectors
- ODBC
- Aha! 8.0
- Amazon Redshift 8.0
- Apache Cassandra 8.0
- Apache Hive 8.0
- Apache Spark SQL 8.0
- Autonomous Rest Connector 8.0
- Cloudera Impala 7.1
- dBase 7.1
- + 24
An operation involving a Unicode application and a non-Unicode driver incurs more overhead because function conversion is involved.
Windows
- The Unicode application sends UCS-2/UTF-16 function calls to the Driver Manager.
- The Driver Manager converts the function calls from UCS-2/UTF-16 to ANSI. The type of ANSI is determined by the Driver Manager through reference to the client machine’s Active Code Page.
- The Driver Manager sends the ANSI function calls to the non-Unicode driver.
- The driver returns ANSI argument values to the Driver Manager.
- The Driver Manager converts the function calls from ANSI to UCS-2/UTF-16 and returns these converted calls to the application.
UNIX and Linux
- 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.
- The Driver Manager converts the function calls from UTF-8 or UTF-16 to ANSI. The type of ANSI is determined by the Driver Manager through reference to the client machine’s value for the IANAAppCodePage connection string attribute.
- The Driver Manager sends the converted ANSI function calls to the non-Unicode driver.
- The driver returns ANSI argument values to the Driver Manager.
- The Driver Manager converts the function calls from ANSI to UTF-8 or UTF-16 and returns these converted calls to the application.