Hello everyone
I’m trying to convert a JSON file to XML using the JSON / XML workflow plugin
The problem is that the JSON file has special characters (ñ, Ñ, é, ó, …)
When executing the conversion, the fields with special characters in the XML are blank.
How can I change the default (UTF-8) in the plugin and use ISO-8859-1 for the conversion?
thank you in advance
Hi Claudio,
Have you tried using the Translator plugin in the Actions category? It has ISO-8859-1 in the Target Encoding dropdown list.
Regards,
S
Hi Sharne, my proccess take the values from the repository, the script return a json. the jason has the right characters, the next step is the conversion json to xml.
After the execution of the json/xml plugin the fields with the special characters where cutted.
Claudio
Hi Claudio,
Apologies for only getting back to you now. My ISP likes to send OL Learn emails to spam without notification.
So from your reply you are grabbing from repository, script to create json then XML/JSON Conversion. This is what I did.
I grabbed a sample json file from the net and copied and pasted those characters from your post above. I ran a simple process in debug. Folder Capture->XML/JSON Conversion->Send to Folder. I see what you mean, the special chars disappear.
So I changed my debug process as follows. Folder Capture->Translator->XML/JSON Conversion->Send to Folder. And now it works just fine keeping the special chars in place. Below is my Translator settings. It had to be the opposite of what you mentioned in your original post funny enough.
Source Encoding:
28591 (ISO 8859-1 Latin I)
Target Encoding:
65001 (UTF-8)
Include target encoding signature checkbox selected.
Also note that no matter what Target Encoding you choose the XML files encoding reference always reads encoding=“UTF-8”?. Like I said, it’s a reference only and not necessarily the files actual encoding.
Hope this helps.
Regards,
S
Hi Sharne,
I followed your steps, the solution worked fine. But with one difference: when I check the target encoding signature the xml/json plugin show a error message (the input file is not a valid json file) but when I uncheck the target encoding signature the proccess worked fine.
thank you very much
Claudio