Topic "Line endings issue"

Author Message



When I edit a text file with a double-click, line endings are converted from Unix format (LF) to Windows format (CR+LF), no matter the transfer mode I use in preferences (auto or binary). I checked the downloaded file to be sure it was not because of my text editor (Notepad2).

I post this issue because there's a work around : first download the file, edit it then upload the new version. Line endings will not be converted (in extenso, don't use a double-click).


Version : 4.2.7
OS : Vista Family Premium SP 2
Transfer protocol: FTP, SFTP
GUI interface style: explorer
Remote system: UNIX Type L8, no compression
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
Make sure you do not have Force text transfer mode for files edited in external editor option enabled in editor preferences.
Martin Prikryl

Oops, I missed this one. Thank you, Martin.

And sorry for this false bug report.



Hi Martin:
I am using the internal editor. When I edit a remote file, it opens fine with no CR-LF problems. But after editing and I save the file to the server, the file size increases and upon inspection using vi, there are additional ^M characters appended to the end of each line. I think the editor is OK, but when I save the file it is in binary format.
I am using 4.2.5 and did not have this issue with previous versions.
Even if I use an external editor (notepad or wordpad), the file is always saved on the server with CR-LF.
Any Suggestions?

Version : 4.2.5 (Registry install)
OS : Windows XP Professional 32-bit
Transfer protocol: FTP, SFTP
GUI interface style: commander
Remote system: UNIX IBM AIX

Hi - I read your information o "Environment" and changed server settings from CR-LF to LF.
UTF-8 I left on Auto.
I should just search the forums and read before posting...

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License