cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Special Characters in PI

Former Member
0 Kudos

Hi,,

We have an XML file where in Payload, we are having some spl characters like

£ , & , u2018 , u201C < , > we replaced the symbols £ , & , u2018 , u201C with the respective HTML codes using Java Mapping and when trying replace < > , we are facing problem, Since these tags are there in XML file.

Please provide any suggestions, can we make it generic as we cant change the Mapping each time we get more spl characters, does any encoding/changing code page works in this case.

Regards,

Varun

Accepted Solutions (0)

Answers (3)

Answers (3)

varun_k
Contributor
0 Kudos

Applied File Encoding ISO-8859-1

stefan_grube
Active Contributor
0 Kudos

£ , & , u2018 , u201C < , > we replaced the symbols £ , & , u2018 , u201C with the respective HTML codes using Java Mapping and when trying replace < > , we are facing problem, Since these tags are there in XML file.

Where does this XML file come from? The sender of the file should provide a valid XML. When there are <,> in the XML, you have no chance to replace it.

If you can control the sende, do the work there. If not, deny that XML. Tell the sender, that the XML must keep the XML standards.

varun_k
Contributor
0 Kudos

Hi Stepen,

http://forums.sdn.sap.com/post!reply.jspa?messageID=9243412#

Thanks alot for your inputs, As part of the Integrationg Testing, The tester were sending some junk data like this in the XML file

before ? symbol we have less than greater than symbols which is not visible here.

so we were able to handle £ & but facing problem with less than greater than symbols. wat u said is true, Its better that we need to discuss with the Testing Team and the Functional Owner.

Or else I think we can use CDATA tags to pass the Data since its an Description Field

Regards,

Varun

Edited by: Varun Reddy on Jun 24, 2010 1:24 PM

Edited by: Varun Reddy on Jun 24, 2010 1:25 PM

stefan_grube
Active Contributor
0 Kudos

> As part of the Integrationg Testing, The tester were sending some junk data like this in the XML file

LOL

That was a good one.

You made my day

former_member204873
Contributor
0 Kudos

Check this blog:

https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]