R. David Murray <rdmur...@bitdance.com> added the comment: I'm updating the patch to contain a couple tests using non-ASCII. More are needed.
Before this patch, one could process a file containing non-ASCII characters as text, and if your default encoding happened to be able to decode it, things would appear to more or less work. In real life doing this is most likely to produce mojibake. So the patch now rejects string input that contains non-ASCII characters with a helpful message about using bytes or Message input. Email doesn't handle messages in string format that contain non-ASCII characters, either (which, I think, was the source of the error Steffen encountered). This means that the string backward-compatibility is reduced to ascii-only messages. But if mailbox in py3 is being used successfully by anybody, it is most likely to be someone processing ascii only messages for some reason. ---------- Added file: http://bugs.python.org/file20579/mailbox3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com