Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi,
i have a service which works with uploaded csv files. For a test a customer send me csv files with utf-16 encoding. My service have some trouble with this encoding. Can I recode files in thingworx?
Hi @drichter could you please add more information on what sort of service / method you are working with. Are you parsing it with any specific encoding? I'm not entirely sure if the issue you are running into is because of the Tomcat's setting which is set to UTF-8 as recommended in the installation guide for ThingWorx. Any possibility to also attach test csv file of the type you receive from your customer?
Anyhow, will more info I could reach out to concerned team for help on this.
I made a service which try to parse the csv file. It split the csv into a array of lines:
lines = csvcontent.split('\n');
Then I iterate through all this lines and parse the elements:
elements = singleLine.split(',');
If you what the conent of this element or lines I get many non-printable characters because thingworx try to interpret a utf-16 file as a utf-8 file.
To show what its look like:
The problem some files of the customer are utf-8 and some utf-16.