Application programming guidelines for handling different encoding schemes
The Db2 ODBC driver determines whether an application is an EBCDIC, Unicode, or ASCII application by evaluating the CURRENTAPPENSCH keyword in the initialization file. You must compile your application with a compiler option that corresponds to this setting.
Specify corresponding encoding schemes for the Db2 ODBC driver and your application, by performing
the following actions:
- Set the CURRENTAPPENSCH keyword in the initialization file to EBCDIC, UNICODE, or ASCII, or to a CCSID from which the driver derives the encoding scheme. EBCDIC is the default.
- Compile the application in EBCDIC, Unicode (with either the UTF-8 or UCS-2 compiler option), or ASCII.
When you write ODBC applications, you also need to choose API entry points and bind host variables to C types that are appropriate for the encoding scheme of your application.