Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11605>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to