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.
Attribute
Description
SQL_ATTR_APP_WCHAR_TYPE (1061)
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.