Author janssen
Recipients christian.heimes, draghuram, exarkun, janssen, loewis, rtmq
Date 2008-01-31.18:03:16
SpamBayes Score 0.00902838
Marked as misclassified No
Message-id <1201802597.65.0.981006186047.issue1210@psf.upfronthosting.co.za>
In-reply-to
Content
IMAP doesn't really support multiple charsets (just looked at RFC 3501).
 There are two places where character sets other than ASCII is used. 
One is in the SEARCH command; there's an optional parameter which can
indicate that the search strings are in a non-ASCII character set.  The
other is in transmission of message literals (email messages) back and
forth.

So probably setting the default encoding at this level isn't quite
right, as you should definitely be reading raw bytes from the socket,
not characters, but it isn't too far off.  Looks like _command() needs a
bit of work (it shouldn't try to quote bytes, only strings), and the
documentation need to be improved, to say that non-ASCII search strings
and message bodies should be passed as bytes encoded according to the
specified CHARSET, but with those fixes it should work.  Assuming that
bytes are hashable in Python 3K.
History
Date User Action Args
2008-01-31 18:03:17janssensetspambayes_score: 0.00902838 -> 0.00902838
recipients: + janssen, loewis, exarkun, draghuram, christian.heimes, rtmq
2008-01-31 18:03:17janssensetspambayes_score: 0.00902838 -> 0.00902838
messageid: <1201802597.65.0.981006186047.issue1210@psf.upfronthosting.co.za>
2008-01-31 18:03:17janssenlinkissue1210 messages
2008-01-31 18:03:16janssencreate