cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
natvidre
Frequent Visitor

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.

 

 

5 REPLIES 5
v-litu-msft
Community Support
Community Support

Hi @natvidre,

 

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.

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
Frequent Visitor

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'))

 

karacsondi
Frequent Visitor

Brilliant solution @chanwulee ! Thanks a lot! 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,982)