On 2020-08-27 09:34:47 +0100, Chris Green wrote:
> Peter J. Holzer <hjp-pyt...@hjp.at> wrote:
> > The problem is that the message contains a '\ufeff' character (byte
> > order mark) where email/generator.py expects only ASCII characters.
> > 
> > I see two possible reasons for this:
[...]
> > Both reasons are weird.
[...]
> > But then you haven't shown where msg comes from. How do you parse the
> > message to get "msg"?
> > 
> > Can you construct a minimal test message which triggers the bug?
> > 
> Yes, simply sending myself an E-Mail with (for example) accented
> characters triggers the error.

Ok. So it's not a specific message, but any mail with accented
characters.

Since Python's mailbox module handles mails with accented characters
just fine (I've processed thousands of mails with it), the bug is almost
certainly in your program. And, as I explained above, almost certainly
in the part which you didn't show us.

Can you reduce your program to the minimum which still triggers the bug
and post the result here?

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | h...@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to