Hm,

reading http://tools.ietf.org/html/draft-ietf-secsh-filexfer-03 I think the 
condition should be if(sversion >= 3) ...

Martin
________________________________
From: Viet H. Phan [[email protected]]
Sent: Wednesday, November 24, 2010 9:23 AM
To: [email protected]
Subject: [JSch-users] File name encoding

Hi,

The SFTP specs (http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13) say 
that with versions from 3 to 5, file names must be encoded in UTF-8; with 
versions from 6 to 13, file name encoding can be negotiated by the server and 
the client; while there is no explicit statement for versions from 0 to 2.

And, I see the following in method "setFilenameEncoding" in class 
com.jcraft.jsch.ChannelSftp:

...
    int sversion=getServerVersion();
    if(sversion > 3 &&
       !encoding.equals(UTF8)){
      throw new SftpException(SSH_FX_FAILURE,
                              "The encoding can not be changed for this sftp 
server.");
    }
...

Do you think the Jsch code violates the SFTP specs?

Regards,
Viet



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to