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.
<invalid hyperlink removed by admin>
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 :)
Reply with quote