Setting ASCII mode in Jsch

前端 未结 1 949
孤城傲影
孤城傲影 2021-01-14 03:19

I need to overcome a Unix - Windows file format (LF to CRLF) issue I\'m currently having. The ftp client I am using is Jsch from Jcraft.

The documentation online is

1条回答
  •  再見小時候
    2021-01-14 04:12

    The text mode flag was added to SFTP protocol version 4. Jsch currently supports SFTP protocol version 3, which doesn't specify a text-mode flag.

    You can see a list of SFTP specification revisions here. The RFC for protocol version 3 is here. Note that OpenSSH, the most widely used SFTP server, only supports protocol version 3 as well, and doesn't support line terminator conversion. So having the flag in Jsch wouldn't be very useful.

    0 讨论(0)
提交回复
热议问题