It does not. You have to know the charset used on the remote side and decode accordingly. The version of sftp that libssh2 supports just transfers filenames as a bag of bytes. Just like OpenSSH
On Wed, 12 Jun 2019, 10:47 许 瑞强, <xu.ruiqi...@outlook.com> wrote: > Hi list. > > Using the libssh2 sftp API I can successfully manipulate the files of the > remote host, but I have a problem, the file name of the remote host is not > UTF-8 encoding. When I use the API to get the file list, I get garbled, I > read RFC: draft-ietf-secsh-filexfer-13.txt > <http://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/draft-ietf-secsh-filexfer-13.txt> > s6, see sftp can set filename-charset, I would like to ask everyone, > does libssh2 sftp API supports the setting of filename-charset, if > supported, how to set? I use the xftp tool to test, it is able to set the > encoding, and correctly display the file name. > Anyone can help me ? > > thank you all. > _______________________________________________ > libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel >
_______________________________________________ libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel