Topic "Plugin 1.4.1 converts linefeeds on transfer"

Author Message
techie

Guest


While transferring files with unix linefeeds from Far to SF, WinSCP plugin converts linefeeds to windows ones. I dk - maybe it converts them while downloading. In either case is it possible to disable this behavior?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Depending on configuration, WinSCP may do what you describe. Check Environment tab of login dialog for EOL option. It should be set to LF, is it?

To disable the behaviour you can also force binary mode. It can be set on upload dialog.
_________________
Martin Prikryl
techie

Guest


Yes, option in Environment tab is set to LF, but why it converts from LF to CR/LF? I thought default behavior not to alter files while transferring is more preferrable.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
If the option is set to LF, WinSCP removes the CR's on upload when using text/ascii mode. I have just tried to verify it (on SF).

I have no idea what you are doing. Maybe you can post a log file or give me list of the steps that you are doing and the session configuration.
_________________
Martin Prikryl
Guest




I see. Took some time to figure it out. But not only it converts linefeeds from CR/LF to LF while uploading files to *NIX system, but also while downloading it converts LF to CR/LF. I guess this is expectable. The problem was with LF file uploaded to *NIX server and downloaded again with changed CR/LF. Diff messed. =)

I've set it to CR/LF to avoid conversion. Not too obvious though, but it works.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Quote:
I've set it to CR/LF to avoid conversion. Not too obvious though, but it works.

No, but obvious thing to do is to force binary mode for all files Smile
_________________
Martin Prikryl
carthaus

Guest


If I use the GUI and copy a text file over it uses the CR, but when I move the text files over using the command line the CR are not in place and all my text is jumbled together.
techie

Guest


once again the same problem - there is no "force binary" option in download dialog and my files all with LF. although after rereading this post it becomes clear what I have to set CRLF option in environmet more logically would be to have additional "force binary" option in "environment" tab of connection setting.

thx for great plugin
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
There is definitely "binary" option on download dialog. Do not force me to post a screenshot Smile If you still do not have it there, please post screenshot yourself. Maybe we talk about different things.

Also I do not think that transfer mode should be session wide option. You need to have chance to change it per transfer.
_________________
Martin Prikryl
zmey

Guest


techie wrote:
While transferring files with unix linefeeds from Far to SF, WinSCP plugin converts linefeeds to windows ones. I dk - maybe it converts them while downloading. In either case is it possible to disable this behavior?

I also have this behavour:
Far 1.70
WinSCP plugin 1.4.2

when copying 'readme.txt' from Windows to Linux CR/LF are converted to LF. File size changes from 1225 bytes to 1190 bytes. When copying back everything restores.

I cannot find where to configure this behavour at all!

I don't want such 'smart' behavour, I always want *binary* transfer. I don't need text transfer at all. How can I disable it?
Guest




zmey wrote:
I cannot find where to configure this behavour at all!

Sorry, I found where this can be configured. Now it works.
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License