As part of the application, I am using a load external file to load a json file which is encoded in UTF-8
Then I am using the below script to dynamically set the values of a couple of fields before writting the result back to the job file which will be a response to an ajax call from my Connect template.
var json_model = JSON.parse(Watch.ExpandString("%c"));
json_model.logo = Watch.GetVariable(“global.base_url”) + ‘/_iRes/logos/’ + Watch.GetVariable(“customer_name”) + ‘.png’;
/* Write the data to the Job Data File */
var stream = new ActiveXObject(‘ADODB.Stream’);
stream.Type = 2;
stream.Mode = 3;
stream.Charset = “UTF-8”;
In the response JSON received from Workflow, I have lost all special characters àáãäâèéëêìíïîòóöôùúüûñç and others from turkish, swedish and norvegian languages. A problem I didn’t have when I was loading my json whithout using a workflow process.
How can I preserve the accents and other special characters that are inside the original UTF-8 JSON?