[issue1210] imaplib does not run under Python 3

Bill Janssen report at bugs.python.org
Tue Oct 14 17:57:12 CEST 2008


Bill Janssen <bill.janssen at gmail.com> added the comment:

Victor, what kind of content have you tried this with?  For instance, have
you passed unencoded (Content-Transfer-Encoding: binary) binary data through
it, by mailing a JPEG, for instance?  These things are strings really only
at the application level; the data is still bytes.  In addition, the use of
Latin-1 goes against the explicit directives of the IMAP group, doesn't it?
They're pushing UTF-8.

Bill

On Tue, Oct 14, 2008 at 4:27 AM, STINNER Victor <report at bugs.python.org>wrote:

>
> STINNER Victor <victor.stinner at haypocalc.com> added the comment:
>
> Here is a patch for imaplib:
>  - add encoding attribute to IMAP4 class (as ftplib and see also issue
> 3727 for my poplib patch)
>  - use makefile('r', encoding=self.encoding) instead of a binary file
> (mode='rb')
>  - remove duplicate code in IMAP4_SSL
>
> I choosed ISO-8859-1 as the default charset. I tested the library on
> my local IMAP4 server using IMAP4 and IMAP4_SSL classes. But the
> library needs more unit tests as done for poplib.
>
> ----------
> keywords: +patch
> nosy: +haypo
> Added file: http://bugs.python.org/file11786/imaplib_unicode.patch
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue1210>
> _______________________________________
>

Added file: http://bugs.python.org/file11790/unnamed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1210>
_______________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unnamed
URL: <http://mail.python.org/pipermail/python-bugs-list/attachments/20081014/9195e6c4/attachment.txt>


More information about the Python-bugs-list mailing list