Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

SFTP connector and special characters in csv file

(2) ShareShare
ReportReport
Posted on by

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:

 

2019-05-06 14_57_01-Edit your flow _ Microsoft Flow.png

 

Thanks in advance for any help!

  • CU06031955-0 Profile Picture
    5 on at
    Re: SFTP connector and special characters in csv file

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

     

  • Chriddle Profile Picture
    7,669 Super User 2025 Season 1 on at
    Re: SFTP connector and special characters in csv file

    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

    • grabbed the file content (from Sharepoint),
    • used the decodeBase64 function in a Compose action (which results in unknown characters)
    • and created a file on the FTP server from the file content.

    Chriddle_0-1692286804723.png

     

    As you can see in the "Get file content 2 action", the encoded content is still the same

    Chriddle_1-1692287113609.png

     

    and still contains the special characters (encoded in ISO-8859-1)

    Chriddle_2-1692287206233.png

     

    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.

  • oznat Profile Picture
    11 on at
    Re: SFTP connector and special characters in csv file

    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.

  • Chriddle Profile Picture
    7,669 Super User 2025 Season 1 on at
    Re: SFTP connector and special characters in csv file

    Just zip it.

  • oznat Profile Picture
    11 on at
    Re: SFTP connector and special characters in csv file

    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?

  • Chriddle Profile Picture
    7,669 Super User 2025 Season 1 on at
    Re: SFTP connector and special characters in csv file

    Can you provide your CSV file?

  • oznat Profile Picture
    11 on at
    Re: SFTP connector and special characters in 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 �

  • Chriddle Profile Picture
    7,669 Super User 2025 Season 1 on at
    Re: SFTP connector and special characters in csv file

    Does the file content contain a Byte Order Mark?

    https://powerusers.microsoft.com/t5/General-Power-Automate/wrong-caracter-from-CSV-to-sharepoint-list/td-p/2002511

     

  • oznat Profile Picture
    11 on at
    Re: SFTP connector and special characters in csv file

    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.

    oznat_0-1691975877297.png

    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.

     

  • v-lin-msft Profile Picture
    728 on at
    Re: SFTP connector and special characters in csv file

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow