cancel
Showing results for 
Search instead for 
Did you mean: 

Special characters handling - PI 7.1

Former Member
0 Kudos

Hello Experts,

I need assistance with the following scenario -

We have a xml file coming into PI with special characters in the payload. The encoding attribute in the XML header is not always correct i.e. encoding attribute set to UTF-8 while payload content might have some special European characters.

Per my understanding in PI , If the xml encoding attribute was set to correct encoding type I could have set encoding parameter in the adapter to parse the native characters to UTF-8 which PI works on.However, the twist in the story is the inconsistent encoding attribute in the incoming XML.

Is there any way to read the payload to figure out the correct encoding type and override the xml header to set the correct encoding type at PI end.

- Rajan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

the basic understanding is, that a XML message has a correct encoding - so the payload is readable in relation to the given encoding in the header. The sender always has to make sure that the encoding is correct. The receiver will look at the XML header - figures out which encoding it is and then tries to read the payload.

In case payload carries chars, that are not supported by the given encoding - how should the receiver know what's correct? Encoding or payload?

Regards,

Kai

Former Member
0 Kudos

Thanks for the reply Kai!!

In the current system, we have a java program at the outbound end which reads the paylod to find out the correct encoding type.If it finds special chacters matching to certain encoding type then it overrides the encoding type in the XML header....What we are trying to figure out here If there is something in PI at the time ID where based on the payload contents the encoding type can be overridden.

_ Rajan

JoelTrinidade
Active Contributor
0 Kudos

hi Rajan,

Currently that has been not catered to in PI.

Regards

joel

Former Member
0 Kudos

Okay understand - but In PI no such thing is available till now..

Kai

Shabarish_Nair
Active Contributor
0 Kudos

you cannot set the encoding dynamically at the sender side

you will have to have multiple channels to support multiple encodings