XML messages with the special characters(Ý,¨) , which are actually XML valid characters are being treated as invalid characters for the default encoding that is assigned to a message, when not specified. We tried to make this work by specifically adding the encoding type to the top of the message. We used the UTF-8 encoding. So by adding "" to the very beginning of the XML message, the characters should ideally become valid characters.
To add the XML declaration, we used WITH ENCODING 1208 while doing an XML GENERATE to generate the declaration in the xml document.
- Default Encoding option: IBM-1140
- The XML document is generated inside an alphanumeric data item.
- XMLPARSE (XMLSS) compiler option is in effect
We then put the generated XML(with declaration) into a CICS container DFHWS-BODY. But CICS then attaches the Envelope to the very beginning of the xml document passed from the Cobol program.
So, the question here is how can we attach the XML declaration(in CICS) to the very beginning of the xml document for the outside environment to identify the encoding option and convert the special characters in the correct format?