devlhl opened a new issue, #388: URL: https://github.com/apache/mina-sshd/issues/388
### Version master ### Bug description 1) fist, the sftp server has tow types of charset file(file name charset:UTF-8、GBK)and all contains Chinese character. 2) the sftp server default LANG is UTF-8,so the file with UTF-8 is OK and the file with GBK is display garbled code 3) because `sftpClient.setNameDecodingCharset(Charset.forName("GBK"));` SftpClient can correctly read display garbled code file SftpClient sftpClient = factory.createSftpClient(session).singleSessionInstance(); sftpClient.setNameDecodingCharset(Charset.forName("GBK")); System.out.println(sftpClient.stat("xxx/xxx_中文字符.pdf").isRegularFile()); 4) however, regardless of whether encoding is set or not, the ScpClient cannot work well same as SftpClient ScpModuleProperties.SCP_OUTGOING_ENCODING.set(sshClient, Charset.forName("GBK")); // or not ScpClientCreator creator = ScpClientCreator.instance(); ScpClient scpClient = creator.createScpClient(session); scpClient = CloseableScpClient.singleSessionInstance(scpClient); scpClient.download("xxx/xxx_中文字符.pdf", "src/main/resources/"); 5) i find the code org.apache.sshd.client.channel.ChannelExec#doOpen buffer.putString(command); // this command has the file name with Chinese character and it use default UTF-8 with getBytes ### Actual behavior ScpClient cannot read files with non UTF-8 encoded file names ### Expected behavior ScpClient want read files with non UTF-8 encoded file names ### Relevant log output _No response_ ### Other information _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org