如何使用ftp_put和utf-8字符

I am using a custom function that creates a text file with fopen() and then this text file is uploaded on a server using ftp_put in ASCII mode.

My problem is that once the file is uploaded and once I open it in my text editor, accents are automatically transformed into gibberish characters instead of staying the same.

I know there is no FTP transfer mode for UTF-8, so what php function should I use to keep the utf-8 characters properly formatted once I open the file that has been uploaded?

fopen(..., 'w+')
original string : é
ftp_put(...., FTP_ASCII)
once the file is uploaded, the string looks like: én

Thanks

Don't use FTP_ASCII. This mode automatically converts the line endings from the platform standard of the FTP client into the platform standard of the FTP server. Always use binary mode - this will transfer all files unchanged.

And then: How do you check the file was uploaded correctly, and how are you actually transferring the data?