Try OpenEdge Now
skip to main content
Messaging and ESB
Messaging Examples : Pub/Sub messaging examples : Publishing, subscribing, and receiving an XML document in a BytesMessage : XML code page encoding
 
XML code page encoding
OpenEdge applications work with the built-in XML parser. It is important to consider the code page encoding of XML messages. In principle, XML documents can be encoded with any code page. However, XML parsers support some or all code pages, and XML parsers also differ with respect to the code page conversions that they support.
OpenEdge clients set and get XML text using the ABL CHARACTER data type. CHARACTER data is encoded by the ABL interpreter according to the internal code page (the -cpinternal startup parameter). The ABL–JMS implementation automatically converts the text to Unicode when it is sent to the JMS server, and from Unicode to the internal client's code page when the text is sent from the server to the client.
In general, when the characters used by the XML document are from the 7-byte ASCII subset, there are no issues the ABL programmer has to consider. Otherwise, observe the following examples and guidelines in the following examples.