[issue9124] Mailbox module should use binary I/O, not text I/O

Steffen Daode Nurpmeso report at bugs.python.org
Fri Jan 28 15:07:18 CET 2011


Steffen Daode Nurpmeso <sdaoden at googlemail.com> added the comment:

After cloning branches/py3k (i now have three different detached repo snakes in my arena (2.7,3.1,py3k), by the way - not bad for a greenhorn, huh?).
I've applied RDMs patch from msg127245.
Note: the test mails are *malformed*!
Stuff in brackets are my error messages, rest is "str(ex)".

1. Single Latin-1 character in "From:" (00F6;LATIN SMALL LETTER O WITH DIAERESIS):
    [ERROR: failed to handle box "/Users/steffen/tmp/au.latin1":] expected string or buffer
2. Whatever-Encoding in "Subject:" (see example 2 below):
    [PANIC: Box source-changes.mdir: message-add failed, mails may be lost:] 'ascii' codec can't encode character '\ufffd' in position 8: ordinal not in range(128)

Here are two stripped header fields pasted in an UTF-8 environment:

From: "SAJATNAPTAR.COM" <info at sajatnaptar.com>$
Subject: Falinaptár ingyenes házhozszállítással. Már rendeltél? Olvass el!

From: "Syria Trade Center :" <no-reply at syriatc.com>$
Subject: ÅÝÊÊÇÍ ÇáãßÊÈ ÇáÑÆíÓí ááãÑßÒ - æÊÞæíã 2011

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9124>
_______________________________________


More information about the Python-bugs-list mailing list