Subject: Re: Does libssh2 sftp support setting filename-charset?

Re: Does libssh2 sftp support setting filename-charset?

From: Alexander Lamaison <>
Date: Wed, 12 Jun 2019 11:15:28 +0100

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 许 瑞强, <> 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
> <>
> 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

Received on 2019-06-12