Giampaolo Rodola' <g.rod...@gmail.com> added the comment:

It's been a long time since I implemented UTF-8 support in pyftpdlib, but long 
story short is that:
- most recent servers are supposed to use UTF-8 by default
- such servers must include "UTF-8" in the FEAT command response
- some servers may enable UTF-8 only if client explicitly sends "OPTS UTF-8 ON" 
first, but that is based on an draft RFC. Server implementors usually treat 
this command as a no-op and simply assume UTF-8 as the default.

With that said, I am -1 about implementing logic based on FEAT/OPTS: that 
should be done before login, and at that point some servers may erroneously 
reject any command other than USER, PASS and ACCT. 

Personally I think it makes more sense to just use UTF-8 without going through 
a deprecation period, document *encoding* attribute and mention that in order 
to deal with servers not supporting UTF8 you can pre-emptively check FEAT 
response and set ASCII encoding. But I am not a unicode expert, so I would like 
to hear some other opinion re. the implications of going from latin-1 to utf8 
in terms of potential code breakage.

----------
nosy: +benjamin.peterson, ezio.melotti, lemburg

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to