If the declared character sets of your client and server differ, you must be careful when declaring the character set of your XML documents.
Every XML document has a character set value. If that encoding is not declared in the XML declaration, the default value of UTF8 is assumed. The XML processor, when parsing the XML data, reads this value and handles the data accordingly. When the default character set of the client and server differ, Sybase IQ bypasses normal character set conversions to ensure that the declared character set and the actual character set remain the same.
If you introduce an XML document into the database by providing the complete text in a set variable statement, Sybase IQ translates the entire SQL statement into the server’s character set before processing the insertion. This is the way Sybase IQ normally translates character text, and you must ensure that the declared character set of the XML document matches that of the server.
If you read an XML document from the database, Sybase IQ does not translate the character set of the data to that of the client, thus preserving the integrity of the XML document.