Stefan Ram <r...@zedat.fu-berlin.de> wrote: > Chris Green <c...@isbd.net> writes: > >Therein lies the problem, the incoming byte stream *isn't* ASCII, it's > >an E-Mail message which may, for example, have UTF-8 or other encoded > >characters in it. Hopefully it will have an encoding given in the > >header but that's only if the sender is 'well behaved', one needs to > >be able to handle almost anything and it must be done without 'manual' > >interaction. > > I would make a difference between "scoring" and "transport": > > To transfer a message into an mbox it can be transferred as it is. > Just the bytes from the POP3 server. Let mutt deal with them. > That's what I do at present in Python 2, the problem is that Python 3 complains when I use the standard library to put the message into the mbox.
I want to transport the message into my mbox and Python 3 won't do it without knowing how it's encoded whereas Python 2 just stuffed it in there 'as is'. I want Python 3's mailbox class to juyst put what I tell it (even if mis-formatted or mis-encoded) into the mbox. -- Chris Green ยท -- https://mail.python.org/mailman/listinfo/python-list