cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I am having a character conversion problem bringing in a XML file into XI.

It is converting the data wrong.

I have a file adapter picking up Audit.xml encoding is utf-8, use binary mode to pick it up.

XI takes the file and converts it into a text file.

I compared the hex of Audit.xml source file and the Audit.txt file and the characters are different for a specific few.

See attached image for details

Please let me know if any additional information will help

http://i9.photobucket.com/albums/a68/tkc204/SAP%20XI/Audit.png

0 Likes
View Entire Topic
Former Member
0 Likes

Then there is something wrong with the input XML document. It often happens that external applications send with declared XML header encoding UTF-8, but in reality it is ISO-8859-1. The ugly thing is, most of the time the problem will not be recognized, because most of the standard characters are encoded the same in UTF-8 and ISO-8859-1. But have a look at the ascii chars > 127, there you will see the problem.

You will note that problem if you just open the input file e.g. in Internet Explorer: if it displays some garbage for special characters or if it cannot open the file at all, then the sender uses the wrong encoding declaration.

So instead of tuning the XI parameters, better request the sender to send a correct XML

CSY

stefan_grube
Active Contributor
0 Likes

> Then there is something wrong with the input XML document. It often happens that external applications send with declared XML header encoding UTF-8, but in reality it is ISO-8859-1.

You are right, that happens often. But here the input file is correct..

As you see in hex code, the characters are valid UTF-8 characters.

S.R.Suraj has already provided a solution for the issue, so I think this is solved.

Former Member
0 Likes

Actually for this case Christian is right the source xml that I am receiving wasn't valid UTF-8. The program generating the xml was just putting the encoding - utf-8 tag on top because that's what the code told it to do.

The actual data is Windows-1252 in xml. So when XI reads it, it uses the utf-8 tag on top and is expecting UTF-8, but it was getting something else causing the unsupported characters to get converted.

The HEX was different on the Source XML comparing it to what XI was generating after File Adapter.

After making the output change to Windows 1252. It changes back to the expect HEX.

Source - is at Windows 1252

XI - it will use UTF-8 (no way to change it)

Target - forced to create in Windows 1252

Other helpful tools I used: W3C Validator - upload the file and found that I wasn't receiving UTF-8

I hope this is clear and helps someone else in the future.

Thanks For everyone's input.

Chirag