Good that you have a workaround.
But the situation is really bad, why stating to use XML standard, when not complying?
I would just reject those messages and force client to send valid data if I had the power to do so.
P.S:
Many years ago we had a customer ticket that DataPower choked on google maps XML data.
It turned out we correctly choked, because that XML came withoout XML declaration (meaning encoding has to be UTF-8), but it was not UTF-8 encoded.So we said our customer to raise a ticket at google.
Obviously they did that (it was a big customer), and short time later google maps returned valid XML ;-)
------------------------------
Hermann Stamm-Wilbrandt
Compiler Level 3 support & Fixpack team lead
IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
https://stamm-wilbrandt.de/en/blog/------------------------------
Original Message:
Sent: Thu February 24, 2022 10:26 AM
From: Vijayasaradhi Peddysetty
Subject: DataPower UTF-16
We are actually getting UTF-8 encoded xml with UTF-16 characters. Our clients cannot change it so we are taking the incoming stream as non-xml and re-encoding with UTF-16. Thank you got it to work.
------------------------------
Vijayasaradhi Peddysetty
Original Message:
Sent: Thu February 24, 2022 08:08 AM
From: Hermann Stamm-Wilbrandt
Subject: DataPower UTF-16
<xsl:output method="xml" encoding="UTF-16" />
This will output UTF-16 encoded XML, but ONLY if the output context of the xform action is OUTPUT, no Results action.
------------------------------
Hermann Stamm-Wilbrandt
Compiler Level 3 support & Fixpack team lead
IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
https://stamm-wilbrandt.de/en/blog/
Original Message:
Sent: Tue February 15, 2022 10:21 AM
From: Charlie Sumner
Subject: DataPower UTF-16
Please make sure that you are using the correct context in the results action. The context should be the output of your transform where you specified the xsl:output statement. I tried it yesterday with a simple stylesheet and it definitely worked for me.
If you feel that you have done everything correctly, then please open a case with IBM Support so someone can help you directly.
------------------------------
Charlie Sumner
Original Message:
Sent: Tue February 15, 2022 10:14 AM
From: Vijayasaradhi Peddysetty
Subject: DataPower UTF-16
We tried applying the output format. But had no luck as well.<xsl:output method="xml" encoding="UTF-16" />
------------------------------
Vijayasaradhi Peddysetty
Original Message:
Sent: Mon February 14, 2022 05:38 PM
From: Charlie Sumner
Subject: DataPower UTF-16
You can't really 'preserve' the encoding per se. DataPower parses to UTF-8 as part of it's parsing process. You can output to UTF-16 using this statement in your XSLT:
<xsl:output method="xml" encoding="UTF-16" />
Charlie
------------------------------
Charlie Sumner
Original Message:
Sent: Fri February 11, 2022 09:35 AM
From: Vijayasaradhi Peddysetty
Subject: DataPower UTF-16
Hi All,
I have a requirement to pass the UTF-16 incoming xml to the downstream web service. The issue is the MPG is converting the UTF-16 to UTF-8 which is truncating the emojis characters. Wondering how do we preserve the encoding.
Please advise.
Regards,
Vijay..
------------------------------
Vijayasaradhi Peddysetty
------------------------------