The client/server DB2 database environment provides some challenges for ensuring that an XML document is encoded properly for each client or server that accesses the document. It is important to ensure that the actual code page of the client retrieving an XML document from DB2 matches the encoding declaration (the encoding declaration in the XML document), as in Figure 19.
Figure 19. Clients have matching code pages
![]() |
When DB2 receives or sends an XML document, it does not check the encoding declaration. Rather, it checks the code page for the client to see if it matches the the DB2 server code page. If they are different, DB2 converts the data in the XML document to match the code page of:
When using the XML Extender, it is recommended that all client and server machines have matching code pages to eliminate data conversions.
The consequences of having different code pages are the following possible situations:
Figure 20. Clients have mismatching code pages
![]() |