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, Adaptive Server 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 the values clause of an insert statement, Adaptive Server translates the entire SQL statement into the server’s character set before processing the insertion. This is the way Adaptive Server normally translates character text, and you must make sure that the declared character set of the XML document matches that of the server.
If you introduce an XML document into the database using writetext or Open Client CT-Library or Open Client DB-Library programs, Adaptive Server recognizes the XML document from the XML declaration and does not translate the character set to that of the server.
If you read an XML document from the database, Adaptive Server does not translate the character set of the data to that of the client, since doing so might compromise the integrity of the XML document.