Hi!
I have encountered an issue when files are copied with the SFTP connector from a sharepoint site to a SFTP server with special characters in csv files. It seems this has started suddenly from somewhere around end of March 2019. At least one special character it changes is á to � instead.
This same flow also moves the file from one place to another after the SFTP connector on the sharepoint site and the file is ok when that is done.
Here is the flow:
Thanks in advance for any help!
I was just struggling with a similar problem and by trying to import the csv file into excel I discovered that it was using Windows-1252 encoding.
The solution ended up being a compose step with this expression
binary(setProperty(triggerOutputs()?['body'], '$content-type', 'octet/stream;charset=windows-1252'))
Your CSV is encoded in an outdated way (probably something like ISO-8859-1).
UTF-8 should always be the first choice!
However, if you get the file content and move it around with FTP actions, the content doesn't change.
The only issue is, that Powerautomate's web view can't handle this.
The web page has character encoding UTF-8 and in there a special character in ISO-8859-1 is unknown.
Therfore these special characters are replaced with utf-8's unknown character symbol.
But only in the web view, not in the data!
In my test run I
As you can see in the "Get file content 2 action", the encoded content is still the same
and still contains the special characters (encoded in ISO-8859-1)
Since � ISO-8859-1 is equal to � in UTF-8, I wonder where else you get this mixture of UTF-8 and ISO-8859-1 encoding in your flow. But in my opinion it is not because of the FTP actions.
Oh duh thanks. Here's the zipped sample file for testing purposes generated directly by the same source system.
The CSV is in an FTP and we need to use the SFTP connector to get the file without it losing the special characters.
Just zip it.
I made a sample file for testing purposes (actual file contains personal details) but csv is not a supported file type for me to attach here. Only jpg, gif, png, pdf, zip, doc, docx, ppt, ics, xlsx, xlsm, msapp, pbix, pptx are supported. How would you like me to get the sample file to you?
Can you provide your CSV file?
There is no Byte Order Mark in the CSV. We have tried including a BOM with the expression concat(decodeUriComponent('%EF%BB%BF') however the issue is with the SFTP SSH connector and its 'Get' actions. Viewing the details of the flow run, when opening the input results for the CSV file from the SFTP connection it has already replaced characters such as ø with �. The decode expression just changes the � into �
Does the file content contain a Byte Order Mark?
Same problem here. The SFTP connector seems to be misinterpreting the encoding of the CSV which should be UTF-8 in this case. Because of the wrong encoding being applied by the connector, the file then loses special characters such as ø. Works fine if we force the encoding in the JSON to UTF-8, but then the web interface in Power Automate isn't happy.
To avoid losing special characters, it would be excellent if the SFTP connector in Power Automate could allow users to specify which character set should be used for the CSV.
Hi @Anonymous,
Perhaps utf-8 does not support the conversion of French vowels in CSV file format. You may could to try other methods, such as changing connetor in other file format to store your data.
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.
WarrenBelz
146,635
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional