[ftputil] listdir should return str rather than unicode

刘昶 hongleij at 126.com
Tue Mar 31 15:57:11 CEST 2015



test Enviroment:
Server: File Zilla Server 0.9.50 
Client OS: Win7


import ftputil
# Download some files from the login directory.
with ftputil.FTPHost("localhost", user='honglei',passwd='111111' ) as ftp_host:
    names = ftp_host.listdir(ftp_host.curdir)


I find that:
   name[-1] == u'\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\xad\xe6\x96\x87.txt', 
it is a 'utf-8' encoded filename, rather than an unicode string.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sschwarzer.net/pipermail/ftputil/attachments/20150331/c05faa56/attachment.html>


More information about the ftputil mailing list