Previous Topic Next topic Print topic


Specifying a code page

If your document does not include an encoding declaration in the XML declaration, or does not have an XML declaration at all, the parser uses the encoding information provided by the PLISAX built-in call in conjunction with the basic encoding of the document.

You can also specify the encoding information for the document in the XML declaration, with which most XML documents begin. An example of an XML declaration that includes an encoding declaration is:

<xml version="1.0" encoding="ibm-1140">

If your XML document includes an encoding declaration, ensure that it is consistent with the encoding information provided by the PLISAX built-in and with the basic encoding of the document. If there is any conflict between the encoding declaration, the encoding information provided by the PLISAX built-ins and the basic encoding of the document, the parser signals an exception XML event.

Specify the encoding declaration as follows:

Using a number

You can specify the CCSID number (with or without any number of leading zeroes), prefixed by any of the following (in any mixture of upper or lower case):

IBM_ CP CCSID_
IBM- CP_ CCSID-
CP-

Using an alias

You can use any of the following supported aliases (in any mixture of lower and upper case):

Code Page Aliases
037 EBCDIC-CP-US, EBCDIC-CP-CA, EBCDIC-CP-WT, EBCDIC-CP-NL
500 EBCDIC-CP-BE, EBCDIC-CP-CH
813 ISO-8859-7, ISO_8859-7
819 ISO-8859-1, ISO_8859-1
920 ISO-8859-9, ISO_8859-9
1200 UTF-16
Previous Topic Next topic Print topic