Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPTS UTF8 ON and Windows Explorer FTP client #266

Open
giampaolo opened this issue May 28, 2014 · 4 comments · May be fixed by #596
Open

OPTS UTF8 ON and Windows Explorer FTP client #266

giampaolo opened this issue May 28, 2014 · 4 comments · May be fixed by #596
Labels
bug Component-Library imported imported from old googlecode site and very likely outdated RFC

Comments

@giampaolo
Copy link
Owner

From useboxnet on July 16, 2013 12:49:00

Windows Explorer FTP client expected a success response to "OPTS UTF8 ON" 
command [1], otherwise it will assume the server doesn't support UTF-8 and 
display UTF-8 encoded filenames incorrectly.

This OPTS command isn't supported by pyftpdlib [2].

I've got a report in ftpclodfs related to this [3] and the workaround was 
simple: just return success to a "OPTS UTF8 ON" request [4].

I don't know if this is just windows not playing nice with standards but I find 
that implementing the OPTS command is harmless and fixes UTF-8 support in 
windows' default FTP client.

References:

 - [1]: https://tools.ietf.org/html/draft-ietf-ftpext-utf-8-option-00 - [2]: 
https://code.google.com/p/pyftpdlib/wiki/RFCsCompliance#RFC-2389_-_Feature_negotiation_mechanism_for_the_File_Transfer_P
 - [3]: https://github.com/chmouel/ftp-cloudfs/issues/50 - [4]: 
https://github.com/chmouel/ftp-cloudfs/commit/b4bef39fd394c147c2a85c4f25758bb1b14a9d1f

Original issue: http://code.google.com/p/pyftpdlib/issues/detail?id=266

@giampaolo
Copy link
Owner Author

From useboxnet on July 16, 2013 03:53:53

I forgot, the user reporting the problem is using Windows XP Professional, 
service pack 3, Chinese simplified encoding (GBK).

I've found reports like this with Windows Vista too.

@giampaolo
Copy link
Owner Author

From g.rodola on July 16, 2013 05:55:29

It is Windows Explorer FTP client which is not compliant, because the RFC you 
mentioned is not a standard.

As per RFC-2640 client and server should just use UTF-8 by default. 
Expressively enabling it via OPTS is uncompliant and I find astonishing that a 
company like Microsoft, with thousands of developers, can produce software of 
this quality.

That said...

<compliant mode off =)>

...it might make sense to reply with a positive response and just "do nothing" 
(albeit on the other hand I'm not sure what to do in case of "OPTS UTF8 OFF").
I'm gonna check what proftpd does in this regard and reply here.

Labels: RFC

@giampaolo
Copy link
Owner Author

From [email protected] on July 16, 2013 06:29:03

...and even the non-standard RFC that the OP linked to said the command should 
be "OPTS UTF-8" which is different in two regards to the "OPTS UTF8 ON" that 
Windows Explorer is apparently sending!
Embrace and Extend, anyone? ;-)

@giampaolo
Copy link
Owner Author

From useboxnet on July 16, 2013 06:29:25

I totally agree with you.

If you google a little bit you'll that other projects had the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Component-Library imported imported from old googlecode site and very likely outdated RFC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant