[issue42433] mailbox.mbox fails on non ASCII characters

Florian Klink report at bugs.python.org
Sun Nov 22 05:09:32 EST 2020


New submission from Florian Klink <flokli at flokli.de>:

I'm importing some mbox archives into my maildirs, and use `mailbox.mbox` to parse archives created by pipermail.

Some of these archives seem to contain non-ascii characters, and python just throws a `UnicodeDecodeError` and refuses to process the archive.

Reproducer: (successful on 3.7.9, 3.8.5, 3.9.0)

```
curl https://lists.freedesktop.org/archives/systemd-devel/2016-January.txt.gz | zcat > mbox.txt
python3 -c "import mailbox; mb = mailbox.mbox('mbox.txt');mb.items()"
```

----------
components: email
messages: 381607
nosy: barry, flokli, r.david.murray
priority: normal
severity: normal
status: open
title: mailbox.mbox fails on non ASCII characters
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42433>
_______________________________________


More information about the Python-bugs-list mailing list