The DB2® database
manager determines the CCSID based on the XML internal encoding when
converting data from XML data to another data type, and determines
the XML internal encoding name based on the CCSID when converting
data to the XML data type.
Mappings of encoding names to effective CCSIDs for stored XML data
If data that you store in an XML column is in a binary application variable,
or is an internally encoded XML type, the DB2 database manager examines
the data to determine the encoding. If the data has an encoding declaration,
the database manager maps the encoding name to a CCSID.