05-19-2021 10:54 PM
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
05-21-2021 06:21 PM
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
So wanted to know is that possible.
Thanks,
Harshavardhana
05-22-2021 08:04 AM
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:
and another:
11-04-2022 08:40 AM
Old question, but I fell in the same trap: Excel assumes that CSV files to be encoded in current locale, unless the CSV file starts with the UTF-8 BOM, which is an option available in the CSV Formatter snap:
11-05-2022 09:01 AM
That’s a valuable observation, Joel. Thank you.
11-05-2022 06:31 PM
@joel_bourgault: Thanks for sharing your insights, I have faced similar issue with CSV files, I will give it a try.
I wasn’t able to find a solution thus I went with generating an excel file and doing the manual work of getting it converted to UTF-8.