Topic "ascii file with mixed Unix/Windows line returns"

Author Message
Guest




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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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?
_________________
Martin Prikryl
Guest




LF[10](Unix) / sftp protocol version 5
Guest




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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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.
_________________
Martin Prikryl
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