Author vstinner
Recipients amaury.forgeotdarc, aymanhs, danonymous, giampaolo.rodola, pitrou, rdevaughn, vstinner
Date 2010-08-27.18:28:22
SpamBayes Score 2.84112e-07
Marked as misclassified No
Message-id <1282933705.31.0.0944116521148.issue6822@psf.upfronthosting.co.za>
In-reply-to
Content
pitrou> The FTP class is not supposed to guess in which charset 
pitrou> your data should be encoded.
pitrou> (the "encoding" argument on the FTP class is meant 
pitrou> for protocol commands (such as file names), not for file
pitrou> contents)

I agree, my patch is completly wrong :-) You should open your file in binary mode, not in text (unicode) mode. The issue is more a documentation bug, than a bug in ftplib behaviour.

Here is a new patch: very short patch on the doc (just add "binary" to "open binary file object *file*").
History
Date User Action Args
2010-08-27 18:28:25vstinnersetrecipients: + vstinner, amaury.forgeotdarc, pitrou, giampaolo.rodola, aymanhs, rdevaughn, danonymous
2010-08-27 18:28:25vstinnersetmessageid: <1282933705.31.0.0944116521148.issue6822@psf.upfronthosting.co.za>
2010-08-27 18:28:23vstinnerlinkissue6822 messages
2010-08-27 18:28:23vstinnercreate