On 02:26 pm, [email protected] wrote: >>An even more correct solution would be for `line` to have been encoded >>properly already before it was passed to `sendLine`. Where did the >>data >>come from, and why wasn't it encoded already? > >The data is coming from the FTP directory listing formatting function > >ftp.DTP. _formatOneListResponse > >Here is a more localized fix: > >[autobahn@autobahnhub ~/Twisted]$ svn diff twisted/protocols/ftp.py >Index: twisted/protocols/ftp.py >=================================================================== >--- twisted/protocols/ftp.py (revision 33225) >+++ twisted/protocols/ftp.py (working copy) >@@ -415,7 +415,7 @@ > 'group': group[:8], > 'size': size, > 'date': formatDate(time.gmtime(modified)), >- 'name': name} >+ 'name': name.encode("utf-8")} > > def sendListResponse(self, name, response): > self.sendLine(self._formatOneListResponse(name, *response))
Cool, that seems much more reasonable. It would be great if you could file a ticket for this. Thanks! Jean-Paul _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
