StarSQL Character Conversion

StarSQL uses the IBM Coded Character Set Identifier (CCSID) value to identify client and host encoding schemes in a variety of ways, such as for the Expert Settings that modify the behavior of the driver. The CCSID is just a number that identifies a particular code page.

Character data in most Linux, UNIX, and Windows environments is represented only by a code page, which StarSQL treats as a CCSID. For example, the U.S. form of English using ANSI encoding is CCSID 1252.

The default behavior of the StarSQL driver typically involves the following steps when connecting to a DB2 host and exchanging SQL data.

  1. StarSQL connects to DB2 and obtains the CCSID values that the host expects for SBCS, DBCS, and MBCS data. If they differ than the StarSQL default (37,0,0), these CCSID values are stored in the AutoTypDefOvr setting of the StarSQL data source for future use.

  2. StarSQL sends SQL statements and parameter data to DB2, converting ANSI and Unicode data to UTF-8.

  3. DB2 converts the data to the host server’s code page, if necessary, and then processes the data.

  4. DB2 sends the result back to the StarSQL client.

  5. StarSQL converts the result to either ANSI or Unicode, as requested by the client application.

StarSQL performs inbound data conversion from the host system based upon the mappings that are defined in the ccsid.cvs table that is installed with StarSQL. The ccsid.csv table is platform-specific, and is installed to the \Programs directory of a Windows-based computer.

In order for StarSQL to convert data from one character set to another, there must be a mapping defined in the ccsid.csv table for all the CCSIDs used in the exchange. (For the complete list of supported CCSIDs, refer to the "StarSQL Character Conversion and National Language Support" document in the StarSQL technical documents of the StarQuest Web site.) If there is no mapping defined for a specified CCSID, an error is reported. You can request that additional character conversions be supported by contacting StarQuest Customer Support, and you also can customize the StarSQL data source to use a different CCSID as explained in the topics TypDefOvr and Customizing StarSQL for National Language Support.

If one or more characters cannot be converted between the host and client character sets, StarSQL substitutes a question mark, ?, in place of the character(s). You can configure whether the substitution generates a warning by setting the CharacterSubstitution parameter of the StarSQL data source.