Is it possible to convert any XML received with some special characters (western european charset/iso-8859-1) into normal ASCII text??
I did some R&D and found that we need to use pub.string.bytesToString or pub.string.stringToBytes, I am I on the right track?? Can any one provide me sample implementationï¿½
Since 8859-1 is a superset of ASCII, I’m not sure what you mean by “convert these special chars.” If you’re referring to character encoding conversion, like 8859-1 to UTF-8 (the default encoding used by IS), then you’re on the right track with bytesToString and stringToBytes. Keep in mind that XML posted to IS is automatically processed, depending on the mechanism used. The XML declaration needs to properly identify the encoding used.
I’m also having problems with special characters. I receive an XML file containing characters like “é” and “à” but I’m not able to see them. Once I’ve done wm.tn.doc.xml:bizdicToRecord, here is the kind of data I have.
There is <?xml version="1.0" encoding="iso-8859-1"?> in the header of the file. I try to use pub.string.bytesToString with the encoding at “ISO-8859-1” but I have the same issue. What can I do to solve this?
I’ve made a copy of this flow and add an Exit Flow at the end. I also add a savepipeline and an exit at the beginning of the flow that is suppose to be executed with the processing rule. Once done, I submit the order to the flow “receive” (my copy). I look into TN and the Document Type, the Sender and the receiver were to “unknown” but the content contain the accents. No pipeline file was created for the second flow (with the processing rule)
Take one of the XML docs from the customer that is failing and change the encoding to UTF-8 to see if that is the proper encoding to use. If it works, then ask the customer to change their header when sending the doc.
No. If it turns out that it is indeed caused by the incorrect encoding attribute, then the customer is sending bad data. It would be like them sending ASCII data but them indicating that they are sending EBCDIC. It’s wrong for them to do that. The proper thing (and in this case, the only thing) to do is to correct that error.