I’ve read many thread on this but none seems to be complete…
We receive an xml document from one of our customer with
<?xml version=“1.0” encoding=“iso-8859-1”?>
as the encoding.
We want to replace it with
<?xml version=“1.0” encoding=“UTF-8”?>
because it’s messing up some french characters. They can’t change it so we must do something on our end.
I know I may have to build a new receive service (instead of the default wm.tn:receive one) but I’m not sure of the steps I should use. Should I do a recognize first an then transform the string or bytes to utf-8 ? Or maybe I should use some recordtodocument/documenttorecord ? I’m not sure…
The service pub.xml:loadXMLNode (set encoding=utf-8) might help the problem.Invoke this in your custom receive service and Once you have Node in the pipe use the xmlNodeToDocument (for parsing)
This is a straight forward approach that replaces the encoding.Sorry if this is not you are looking for.
I’m experiencing this problem with an EDI X12 file. The encoding in the EDI config file is set to UTF-8. The file is dropped off in a file poller directory where the file poller service ftp’s the file wn.tn.receive. On the ftp command I’m setting the encoding to UTF-8 but the file still gets truncated at the french e.