Opened 12 years ago

Last modified 7 years ago

#2791 reopened Feature request

Add option for ASCII auto conversion to SFTP transfers

Reported by: softinn Owned by:
Priority: normal Component: FileZilla Client
Keywords: ASCII, sftp, conversion Cc: softinn, Tim Kosse, wallfur@…
Component version: Operating system type:
Operating system version:

Description

The issue has already been discussed, but there is not yet a final answer from the developers, so I am posting this feature request.

I (and tons of other people) would like to have the possibility to do an automatic ASCII conversion during SFTP transfers of text files.

I know that this should be supported on server side and the current SSH server implementations lack support for it, but it could be easily done on client side as WinSCP is doing.

Otherwise we will need to switch to another program.

Thanks a lot,
Paolo

Change History (5)

comment:1 Changed 12 years ago by Tim Kosse

There's no reliable OS detection using the SSH protocol, so proper line ending format cannot be deduced. As such, automatic ASCII conversion would fail.

comment:2 in reply to:  1 Changed 10 years ago by wallfur

Cc: wallfur@… added
Status: closedreopened

Replying to codesquid:

There's no reliable OS detection using the SSH protocol, so proper line ending format cannot be deduced. As such, automatic ASCII conversion would fail.

that's absolutely correct, however, users invariably know the OS of the target platform, and where they don't know they will probably find out soon enough when line endings cause problems on the remote machine.

the common theme to the responses on this issue are ‘it's the user's responsibility to ensure correct line-endings’ but:

  • line-endings should be consistent on a system, both locally and remotely, so all programs can work with them without issue
  • users cannot always control their line-endings, they mightn't know how or have to use certain line-endings for other technical reasons
  • it makes more sense to control line-endings in one place, the ftp client, than in every place a person/program could modify files that need to be transferred
  • ssh should handle OS detection/line-ending conversion, yet doesn't
  • most ftp programs already do their best to handle line-endings, including filezilla, so why not for sftp too?

filezilla would be better equipped if, for sftp only, it defaulted to binary transfers for all files as it does now, but also allowed you to locally specify the line endings used on the remote machine. then it'd just be a matter of applying the existing rules on ascii transfers.

i prefer fz over every other ftp client i've tried, including winscp, but i can't use fz + sftp in its current state.

comment:3 Changed 9 years ago by wallfur

it's one pref per server and (a binary equivalent of) this simple regex replace on read:

s/\r?\n|\r/$eol/g

if you read files in chunks then check if last byte in each chunk is CR, if so, "move" that byte to beginning of next chunk. problem solved. if they're using utf-16 or whatever then warn them it won't work?

comment:4 Changed 7 years ago by Alexander Schuch

More information is available on closed #868 - some links to proposals.

comment:5 Changed 7 years ago by Alexander Schuch

Keywords: ASCII sftp conversion added
Note: See TracTickets for help on using tickets.