Encoding is an aspect of the bits on the wire, not of the XML Infoset Model, which stores codepoints. See the XML Infoset spec here:
https://www.w3.org/TR/xml-infoset/ --- as such, it is relevant for inputs and outputs from the gateway, but not to internal data in the middle of a flow.
Therefore, internal versions of the XML data have no control over encoding, but what form of XML you send on the wire to a backend, or a response to a frontend, can be controlled, as Dominic showed in the prior comment here mentioning xsl:output.
Putting these two pieces of information together, it should become clear that it matters where that XSLT is in your dataflow. If it is generating internal data, then the data won't have any encoding and the xsl:output will have had no effect. If it is generating the result of your flow, or an internal byte buffer (rather than an internal XML document) then it will control the output bytes.
------------------------------
Morris Matsa
------------------------------
Original Message:
Sent: Tue February 15, 2022 03:50 PM
From: DOMINIC MICALE
Subject: Preserving Incoming UTF-16 encoding
In the xml header of the payload you need to set the proper encoding, eg.
<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
Also if you do any transformation actions such as XSLT you need the xsl:output to have the encoding eg. UTF-16
If you do not pass a xml header with encoding DataPower defaults UTF-8, same with XSLT.
------------------------------
DOMINIC MICALE
Original Message:
Sent: Fri February 11, 2022 08:59 AM
From: Vijayasaradhi Peddysetty
Subject: Preserving Incoming UTF-16 encoding
Hi All,
The MPG is converting the UTF-16 encoding to UTF-8. Wondering how can we preserve the UTF-16 encoding in XSLT?
Please advise.
Regards,
Vijay..
------------------------------
Vijayasaradhi Peddysetty
------------------------------