Topic "Detect UTF-8 with SFTP version 3"

Author Message
Cus

Guest


Currently OpenSSH, the most commonly used sftp-server implementation only supports SFTP protocol version 3. This version has a serious problem: the character encoding of the filenames is unspecified with it. It would be very useful if one could add a tiny (no more than a few lines) patch to openSSH and with that patch, the sftp-server could give a hint to WinSCP (and other sftp clients) to use UTF-8 filenames. (The current behavior of WinSCP is not to use UTF8 if sftp protocol version is less than 4 or if it's not explicitly requested in the session configuration dialog)

Probably the simplest way to achieve this is to use a custom extension to sftp. Below is a tiny patch to WinSCP that detects this custom extension, and sets the encoding to utf8 when utf8 setting is configured to Auto.

http://www.pastebin.ca/1497433

If anybody has a better idea to make WinSCP detect utf8 filenames even with openSSH, let me know. Asking the users every time to set the UTF-8 setting to "On" is not very user-friendly, the majority of my users don't even know what utf-8 is, they just want things to work Smile
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I understand your concerns. If the extension gets to OpenSSH or any fork of it, I'm happy to add support for it to WinSCP.
_________________
Martin Prikryl
Guest




I was afraid you say that Smile. Anyway, I will ask the OpenSSH developers, and report back.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License