ascii file with mixed Unix/Windows line returns

Advertisement

Guest

ascii file with mixed Unix/Windows line returns

Hi,

In my work I have to deal with ascii files which contain both Unix and Windows line returns (i.e. CR & CRLF).

I have noticed that these are correctly maintained when transferring to Unix from Windows but not when going back the way i.e. to Windows from Unix.

I have tried this with the latest version of WinSCP using both SFTP and SSH.

Is this a problem with my settings, the server or WinSCP?

Regards,
Danny Poulson.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,551
Location:
Prague, Czechia

Re: ascii file with mixed Unix/Windows line returns

And what's wrong with them? What version of SFTP are you using? What is your session configuration in respect to the end-of-line characters?

Reply with quote

Guest

The same thing happens with SCP protocol

The same thing happens with SCP protocol, all the lines with a single LF character get the CR added for Windows, which in most cases is a good thing.

However if you need the file to be maintained exactly character for character for version control systems it is a pain.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,551
Location:
Prague, Czechia

Re: The same thing happens with SCP protocol

Anonymous wrote:

The same thing happens with SCP protocol, all the lines with a single LF character get the CR added for Windows, which in most cases is a good thing.

However if you need the file to be maintained exactly character for character for version control systems it is a pain.
So you want to maintain the file binary the same? Then you need to turn force binary transfer mode.

Reply with quote

Advertisement

You can post new topics in this forum