Topic "WinSCP changing encoding of files"

Author Message


I am pulling files from my Ubuntu system to my Windows machine and it would appears that the files are being modified by WinSCP. It would appear that either the content or the line end (I suspect the latter) is being changed. For example, when you do a diff of the original and the transmitted file, the text content is the same, but all lines are flagged up as changed.

Is there any way to turn this behavior off so that the file is copied over intact? I've tried changing the end of line option to LF and turning off UTF-8 encoding (they already are UTF-Cool, and even changing the protocol to SCP as it does not support encoding, but this made no difference.

I was finally able to get around the problem by copying the file using SCP in Cygwin.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Please read FAQ:
Martin Prikryl


Thank you for this.

As this reminded me, when doing an FTP transfer manually you have to use a BI command to set the file transfer to mode to binary mode otherwise strange things happen to the files. Here we are using SFTP which is FTP encapsulated in a secure protocol so the same applies. I found the Transfer Mode option in Other General Options under Preferences and changed this from Auto to Binary and tried again. The transferred files now appear to be getting copied over intact so it would seem that the problem is solved.


You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License