on 02-24-2010 8:17 PM
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
Hi Chirag,
Try with File Type as Text at both sender and receiver file adapter.
Regards,
Sunil Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check section 16 for file encoding https://service.sap.com/sap/support/notes/821267 . Also have a look at 3.1 of http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79f... .
Regards,
Sunil Chandra
Hey Thanks, Ive actually have reviewed those before. The file the source system is sending to xi is also not opening up in Internet Explorer.
The source system is 1252 and outputs xml to utf-8
I think there is an issue between those two.
But since the hex is changing in XI, the source system won't look at the data.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> 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.
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
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.