cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Create a .csv file that uses UTF-8 character encoding

Hello,

as the title of the subject already suggests: I want to create a .csv file that uses UTF-8 character encoding.

 

The background is the following:

On a daily basis I retrieve data from Dynamics 365, create a new .csv table and save it in our SharePoint.

For example, if it was a table displaying the past invoices, ideally it would look like

 

currency, amount, invoice_id, customer_name

EUR, 100, 20514_abc, some_näme

 

The flow works totally fine so far - however, customer_name from the example above would be displayed as "some_näme" ...

All I got from my research so far is this post and I am still quite lost. What am I missing?

 

Thanks a lot in advance - I am looking forward to your replies.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
chanwulee
Advocate I
Advocate I

Hi @v-litu-msft ,

 

.csv file is a kind of text file. If you encode it in UTF-8 format, there are two ways to save it.

- Text only

Byte Order Mark(BOM)+Text

BOM is 3 characters (EF BB BF) to mark the file is encoded as UTF-8.

When you generate .csv file in Power Automate, it does not include BOM.

So, when you open the .csv file in excel, special characters(i.e. Korean) will be broken.

 

The solution is to add 3 BOM characters in front of the .csv file content before saving it.

 

concat(uriComponentToString('%EF%BB%BF'),body('Create_CSV_table'))

 

View solution in original post

6 REPLIES 6
v-litu-msft
Community Support
Community Support

Hi @Anonymous,

 

This is a known issue and not caused by Flow, there is no solution could do in the Flow side, sorry.

https://www.i18nqa.com/debug/utf8-debug.html

 

As a workaround, the only way could do in my mind is to use the text replace feature to replace these "ä" to "ä":Annotation 2020-05-15 141458.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks a lot for your fast reply!

Hopefully it's going to be implemented one day, better soon than late.

 

Unfortunately, the workaround won't be a satisfying solution for our issue...

It's way too much effort to use the find and replace option any time for several letters that aren't encoded properly - for any single .csv table created on a daily basis.

 

Maybe there are others having the same issue who just found another workaround that might fit here?

ChristopherBor
Regular Visitor

To my awareness the built in csv creator in flow generates a csv file with UTF-8, the problem stems from the system thinking the csv file is some other format than UTF-8.

 

If you are opening the file in excel, you can use the import function and specify that it is utf-8, which should fix the issue.

 

This guide is old, but the concept is still the same:

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

chanwulee
Advocate I
Advocate I

Hi @v-litu-msft ,

 

.csv file is a kind of text file. If you encode it in UTF-8 format, there are two ways to save it.

- Text only

Byte Order Mark(BOM)+Text

BOM is 3 characters (EF BB BF) to mark the file is encoded as UTF-8.

When you generate .csv file in Power Automate, it does not include BOM.

So, when you open the .csv file in excel, special characters(i.e. Korean) will be broken.

 

The solution is to add 3 BOM characters in front of the .csv file content before saving it.

 

concat(uriComponentToString('%EF%BB%BF'),body('Create_CSV_table'))

 

View solution in original post

karacsondi
Frequent Visitor

Brilliant solution @chanwulee ! Thanks a lot! 

nantanis
New Member

@chanwulee Your method needs to be more acknowledged. Thank you!

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,680)