[Python-Dev] Should ftplib use UTF-8 instead of latin-1 encoding?

"Martin v. Löwis" martin at v.loewis.de
Fri Jan 23 23:18:37 CET 2009


> I don't see how starting with an empty directory helps.  The filename
> comes from the client, and the FTP server can't know what the actual
> encoding of that filename is.

Sure it can. If the client supports RFC 2640, it will send file names
in UTF-8. If the client does not support RFC 2640, the client must
restrict itself to 7-bit file names (i.e. ASCII). If the client violates
the protocol, the server must respond with error 501.

Regards,
Martin


More information about the Python-Dev mailing list