Saving csv in UTF-8 by default

Hi Gooday,

I have a requirement to save the csv file in UTF-8 by default . However in csv formatter we have UTF-8 encoding option , on writing the file in “File Writer” using externsion.csv it is getting saved as comma delimited . However, the format / data are preserved while editing in notepad , but on downloading and opening , the data format is getting changed as it is a special character. So please let us know is there any option to achieve this.

Thanks,
Harshavardhana

Hi ,

Please let me know if I can attach the screenshot here.

Please go ahead.

Hi Dmiller,

These are some sample files below with Taiwanese characters.

image

If I open one of the files as highlighted in yellow in edit mode these characters were preserved.

But if I download/ directly open the file these characters are changed.

This is because though the characters are in UTF-8 as defined in csv formatter , on saving the csv it is by default comma delimited.

How to by default change this to UTF-8 while writing the files in csv .

Thanks,
Harshavardhana

Can you please clarify the context for each of these screenshots? It’s unclear what each is showing.

Where are you seeing the list of files in the first screenshot? What produced those files? Snaps?

When you say “If I open one of the files as highlighted in yellow in edit mode”, what exactly do you mean? Opening where/how?

When you say “But if I download/ directly open”, what do you mean by that? Download from where? What’s the difference between “open” and “directly open”?

Hi Ptaylor,

We are writing a csv file in a file writer using snap in the smb path . Let me share the property of csv formatter and file writer.

CSV FORMATTER:

File writer:

So the files from these snaps are generated and placed in the smb path as mentioned in the file writer expression.

My concern is after these files were getting placed in the server , if you simply open the file by double click the inside Vietnamese/Taiwanese characters are changing .

I mentioned like on editing it is proper . I just right clicked and click on the edit option , the contents are opened in notepad where we could see these characters are preserved.

The reason I mentioned above was these csv files are saved in comma delimited . I wanted to save them in the path using CSV -UTF-8 format in the path

image

So wanted to know is that possible.

Thanks,
Harshavardhana

It’s clear from your CSV Formatter settings and from the Notepad screenshot that the CSV file is being correctly written with the UTF-8 encoding, exactly as you want. However, it looks like the spreadsheet software you’re trying to open that file with is assuming a different encoding, probably the default Windows encoding, Windows-1252. So instead of just double-clicking the file to open it in the spreadsheet software, try opening the software first and then import the file, specifying the UTF-8 encoding on the import. Here’s an article about how you would do this in one version of Excel:

https://www.itg.ias.edu/content/how-import-csv-file-uses-utf-8-character-encoding-0

and another: