COBOL nonnumeric data items are exported to XML as text strings and have trailing spaces removed. (If the item is described with the JUSTIFIED phrase, leading spaces are also removed.) Note, however, that for edited and FILLER data items, leading and trailing spaces are preserved. In addition, any embedded XML special characters not in FILLER data items are represented by escape sequences; the ampersand (&), less than (<), greater than (>), quote ("), and apostrophe (') characters are examples of such XML special characters.
XML strings are imported to COBOL numeric items by storing the algebraic value of the string into the COBOL numeric data item per the rules for its data description. A data conversion error will occur if the XML string does not represent a valid numeric value. (Note: Numeric edited data items are treated as nonnumeric by XML Extensions and thus are imported per the following paragraph.)
XML strings are imported to COBOL nonnumeric items by removing leading and trailing spaces from the XML string and storing the result either left or right justified, depending on the data description of the receiving item. However, for edited and FILLER data items, leading and trailing spaces in the XML string are preserved and no editing is performed when storing into an edited data item. XML escaped characters in the string are converted back to the represented character before storing the string value.
On Windows platforms, nonnumeric displayable data are normally encoded using Microsoft's OEM or ANSI data format. On output, these data are converted to the standard Unicode 8-bit transformation format , UTF-8. On input, data is converted to the OEM or ANSI data format. If the XML SET ENCODING statement is used to specify UTF-8, then the internal data format is UTF-8.
On UNIX platforms, nonnumeric displayable data are normally encoded using a local character encoding that the UNIX system uses. Typically, this may be Latin-1 or Latin-9. On output, these data are converted to the standard Unicode 8-bit transformation format, UTF-8. On input, data is converted to the systems internal format. If the XML SET ENCODING statement is used to specify UTF-8, then the internal data format is UTF-8.