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 : Code page example 1
 
Code page example 1
In this example, two OpenEdge clients use the ISO8859-1 code page:
*Client1 sets XML text in an XMLMessage and sends it.
*Client2 receives the message, extracts the text, stores it in a MEMPTR variable, and creates an XML document. (See Publishing, receiving, and parsing an XMLMessage.)
The following code-page conversions take place:
1. ISO8859-1 (client1) to Unicode (SonicMQ XMLMessage)
2. Unicode (SonicMQ XMLMessage) to ISO8859-1 (client2)
In this example, the XML parser parses the XML document correctly if:
1. The header of the document specifies that the encoding is ISO8859-1.
2. The parser can handle ISO8859-1.