IBM Tivoli NetView for z/OS, Version 6.2

Codepage considerations

The CNMSCBET file is encoded using code page 037 code (US EBCDIC). The code that parses it can work with code page 037, code page 1047, or code page 939. The major differences in the code pages are the square bracket characters. These map to different hexadecimal code points in code pages 037, 1047, and 939. The encoding is specified by the encoding attribute on the XML processing instruction in the file. The specified encoding must match the characters used in the file. The encoding value is specified as an attribute on the xml instruction. For example
<?xml version="1.0" encoding="ebcdic-cp-us"?>
The valid values for encoding, and the code pages that they map to are:
ebcdic-cp-us
037
IBM-037
037
IBM037
037
IBM-1047
1047
IBM1047
1047
X-EBCDICJapaneseAndJapaneseLatin
939
IBM-939
939
IBM939
939

The characters used for square brackets, especially in CDATA sections, must correspond to the proper hexadecimal encodings for the specified code page. In codepage 037, the left bracket character [ is X'BA', the right bracket character ] is X'BB'. However, in code pages 1047 and 939, the left bracket character [ is X'AD', the right bracket character ] is X'BD'.

If square brackets are used within the CDATA sections, map them to the 037 encoding on English systems and to the 1047 or 939 encoding on Japanese systems, regardless of the encoding specified on the xml instruction. The character stream containing the bracket characters is converted based on code page 037 or 939 when the XML event is processed, depending on whether the system is English or Japanese. To avoid incompatibilities, the codepage-independent sequence of &#x5B; can be used for left square brackets and &#x5D; for right square brackets. For example
<cbedata name='example'>
<![CDATA[
<extendedDataElements name='example' type='string'>
<values>This code will have a bracket character coded as &#x5B' in it.</values>
</extendedDataElements>
]]>
</cbedata>
Note: The &#x5B; and the &#x5D; cannot be used for the square bracket characters on the CDATA sections.



Feedback