Topic "UNIX-style-linebreaks on Windows with own Editor"

Author Message
franc
[View user's profile]
Donor
Joined: 2007-05-12
Posts: 46
Hello

I am using the actual WinSCP Version 5.1.0 on Windows XP SP3 (32).
I use as Editor, my own EditPad Pro with multiple Tab Window.

When I edit a file from my Ubuntu 12.04 LTS Server with EditPad Pro, WinSCP downloads the file to a local temp diretory and passes it to EditPad Pro, taking control over changes and passing them to the server.
Unfortunately WinSCP changes the linebreak system to Windows-Style (CR+LF means x0D x0A), when it was unix-style (LF, only x0A).

Is there a way to keep the original linebreak system of the files?
I don't find any setting about this in the Editors Preferences or else:

http://winscp.net/eng/docs/ui_pref_editor
http://winscp.net/eng/docs/ui_editor_preferences

Maybe this is a bug?

Thank you.

frank

EDIT 2012-11-01:
I think I was wrong! The file with unix-style linebreak is shown in my editor as file with windows-style linebreaks, because it is windows-style-linebreaked on my windows temp dir.
But when I save it via WinSCP, on the Ubuntu Server it is still saved with unix-linebreaks (0A only, not 0A0D).
WinSCP remembers and will reuse the linebreak-style, when downloading a file to edit it, I guess.

With this behaviour I won't be able to change the linebreak style with my own editor through WinSCP, but I think normally this won't be necessary.

So this is not a bug, only maybe a missing feature (e.g.: "Pass linebreak-style of own editor through WinSCP"), which likely nobody misses Smile
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Turn off Force text transfer mode for files edited in external editor
http://winscp.net/eng/docs/ui_editor_preferences
_________________
Martin Prikryl
franc
[View user's profile]
Donor
Joined: 2007-05-12
Posts: 46
No, this doesn't change the linebreak-style.
Still, when I open a unix-file it is shown as windows-linebreak in EditPad Pro, which just detects, what linebreak-style the file has. So it must be saved in temp as windows-linebreak-file by WinSCP even with:

Force text transfer mode for files edited in external editor DISABLED
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Then you must have Text or Automatic transfer mode enabled:
http://winscp.net/eng/docs/transfer_mode
franc
[View user's profile]
Donor
Joined: 2007-05-12
Posts: 46
Yes!
That was it!
I had "Automatic" in this Transfer Settings Dialog:

http://winscp.net/eng/docs/ui_transfer_custom

I put it to "Binary" and now it is working!

Thank you for the support!

frank
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