Plugin 1.4.1 converts linefeeds on transfer

Advertisement

techie
Guest

Plugin 1.4.1 converts linefeeds on transfer

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Plugin 1.4.1 converts linefeeds on transfer

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.

Reply with quote

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.

Reply with quote

martin
Site Admin
martin avatar

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.

Reply with quote

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

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

Reply with quote

carthaus
Guest

Similar Problem

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.

Reply with quote

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

There is definitely "binary" option on download dialog. Do not force me to post a screenshot :-) 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.

Reply with quote

Advertisement

zmey
Guest

Re: Plugin 1.4.1 converts linefeeds on transfer

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?

Reply with quote

Guest

Re: Plugin 1.4.1 converts linefeeds on transfer

zmey wrote:

I cannot find where to configure this behavour at all!
Sorry, I found where this can be configured. Now it works.

Reply with quote

Advertisement

You can post new topics in this forum