Message207028
Given this email:
---
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: =?utf-8?q?Ch=C3=A8re_maman?=
From: from@example.com
To: to@example.com
Date: Sat, 28 Dec 2013 13:08:07 -0000
Message-ID: <20131228130807.3669.79195@localhost>
Je t'aime très fort
---
I get this traceback:
---
File "/home/florian/sources/cpython/Lib/email/__init__.py", line 40, in message_from_string
return Parser(*args, **kws).parsestr(s)
File "/home/florian/sources/cpython/Lib/email/parser.py", line 70, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
File "/home/florian/sources/cpython/Lib/email/parser.py", line 60, in parse
return feedparser.close()
File "/home/florian/sources/cpython/Lib/email/feedparser.py", line 170, in close
self._call_parse()
File "/home/florian/sources/cpython/Lib/email/feedparser.py", line 163, in _call_parse
self._parse()
File "/home/florian/sources/cpython/Lib/email/feedparser.py", line 449, in _parsegen
self._cur.set_payload(EMPTYSTRING.join(lines))
File "/home/florian/sources/cpython/Lib/email/message.py", line 311, in set_payload
" payload") from None
TypeError: charset argument must be specified when non-ASCII characters are used in the payload
---
This is new in 3.4 since that's the first version which requires set_payload to provide a charset argument, imo message_from_string should figure that out from the message. |
|
Date |
User |
Action |
Args |
2013-12-28 14:09:03 | apollo13 | set | recipients:
+ apollo13 |
2013-12-28 14:09:03 | apollo13 | set | messageid: <1388239743.81.0.886859790367.issue20089@psf.upfronthosting.co.za> |
2013-12-28 14:09:03 | apollo13 | link | issue20089 messages |
2013-12-28 14:09:03 | apollo13 | create | |
|