16
Views
4
Comments
Solved
[CsvUtil] 【ODC】Downloaded CSV file, the Japanese characters are garbled.
Question
CsvUtil
Forge asset by BlueMeme Inc.

I am using CSVUtil to output CSV,

but when I open the downloaded CSV file, the Japanese characters are garbled.

2021-06-21 12-37-59
Wei Zhu
Solution

@Dilmi Amarasingha
Hi Dilmi

It seems you are using Excel to view CSV and Japanese character is garbled.
This issue usually happened at Japanese Windows OS. Because Excel open CSV as Shift-JIS instead of UTF-8 by default.

But it's OK, There is a flag named HasBOM, if you set it to True and output CSV.
Excel will check the BOM of CSV File and then open CSV as UTF-8.


Regards
Wei

UserImage.jpg
Dilmi Amarasingha

Hi @Wei Zhu
I am able to solve the error.

Thank you so much.

2022-12-22 10-00-39
Beatriz Sabino

Hi Dilmi,

What encode mode are you using when outputting the CSV? It should be set to "UTF-8", and I found a post mentioning "\uFEFF" mode.

UserImage.jpg
Dilmi Amarasingha

Hi @Beatriz Sabino 

Iam using "UTF-8"

2021-06-21 12-37-59
Wei Zhu
Solution

@Dilmi Amarasingha
Hi Dilmi

It seems you are using Excel to view CSV and Japanese character is garbled.
This issue usually happened at Japanese Windows OS. Because Excel open CSV as Shift-JIS instead of UTF-8 by default.

But it's OK, There is a flag named HasBOM, if you set it to True and output CSV.
Excel will check the BOM of CSV File and then open CSV as UTF-8.


Regards
Wei

UserImage.jpg
Dilmi Amarasingha

Hi @Wei Zhu
I am able to solve the error.

Thank you so much.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.