Another 2 to 3 mail encoding problem

Chris Green cl at isbd.net
Wed Aug 26 13:12:31 EDT 2020


To add a little to this, the problem is definitely when I receive a
message with UTF8 (or at least non-ascci) characters in it.  My code
is basically very simple, the main program reads an E-Mail message
received from .forward on its standard input and makes it into an mbox
message as follows:-

    msg = mailbox.mboxMessage(sys.stdin.read())

it then does various tests (but doesn't change msg at all) and at the
end delivers the message to my local mbox with:-

    mbx.add(msg)

where mbx is an instance of mailbox.mbox.


So, how is one supposed to handle this, should I encode the incoming
message somewhere?

-- 
Chris Green
·


More information about the Python-list mailing list