Message133041
ysj.ray, this rude workaround manages it yet for me
(self._msg is a BytesParser() generated Message):
if not self._msg.is_multipart():
return
topmost = True
for part in self._msg.walk():
if topmost:
topmost = False
continue
ct = part.get_content_type()
if not ct.startswith('text'):
continue
try:
payload = part.get_payload()
charset = part.get_param('charset')
if charset is not None:
del part['content-transfer-encoding']
part.set_payload(payload, charset)
except:
Note you can't simply use encoders because those break
on byte messages.
(But it would be cool if you see quopri and base64 fail
and open issues for that!)
Have fun,
Steffen |
|
Date |
User |
Action |
Args |
2011-04-05 15:25:51 | sdaoden | set | recipients:
+ sdaoden, r.david.murray, ysj.ray |
2011-04-05 15:25:51 | sdaoden | set | messageid: <1302017151.57.0.404802932317.issue11605@psf.upfronthosting.co.za> |
2011-04-05 15:25:47 | sdaoden | link | issue11605 messages |
2011-04-05 15:25:47 | sdaoden | create | |
|