WinSCP changing encoding of files

Advertisement

winbug
Guest

WinSCP changing encoding of files

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-8), 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.

Reply with quote

Advertisement

winbug
Guest

Re: WinSCP changing encoding of files

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.

:-)

Reply with quote

Advertisement

You can post new topics in this forum