skip to main content
Reference : Internationalization, Localization, and Unicode : Unicode and Non-Unicode ODBC Drivers : Default Unicode Mapping : Connection Attribute for Unicode

Try DataDirect Drivers Now
Connection Attribute for Unicode
If you do not want to use the default Unicode mappings for SQL_C_WCHAR, a connection attribute is available to override the default mappings. This attribute determines how character data is converted and presented to an application and the database.
Sets the SQL_C_WCHAR type for parameter and column binding to the Unicode type, either SQL_DD_CP_UTF16 (default for Windows) or SQL_DD_CP_UTF8 (default for UNIX/Linux).
You can set this attribute before or after you connect. After this attribute is set, all conversions are made based on the character set specified.
For example:
rc = SQLSetConnectAttr (hdbc, SQL_ATTR_APP_WCHAR_TYPE,
SQLGetConnectAttr and SQLSetConnectAttr for the SQL_ATTR_APP_WCHAR_TYPE attribute return a SQL State of HYC00 for drivers that do not support Unicode.
This connection attribute and its valid values can be found in the file qesqlext.h, which is installed with the product.
Note: On Mac Platforms, the iODBC Driver Manager supports only UTF-32. As a result, this attribute is not currently supported.