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

Sorry, i've forgot the test ;)

----------
Added file: http://bugs.python.org/file21241/11243-test.1.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11243>
_______________________________________
import sys,email

data = r'''Date: Mon, 17 Jan 2011 01:10:29 -0200 (BRST)
From: "Pank! é bom demais." <no-re...@pank.com.br>
To: <m...@openbsd.org>
Subject: 
=?iso-8859-1?Q?Pague_R$50,00_por_R$100,00_em_compras_e_aproveite_a_melhor?= 
=?iso-8859-1?Q?_sele=E7=E3o_de_perfumes_e_cosm=E9ticos_com_pre=E7os_imper?= 
=?iso-8859-1?Q?d=EDveis!?=
Message-ID: <20110117031029.de4ed568...@al88.auinmeio.com.br>

'''

msg = email.message_from_string(data)
allh = msg.items()[:]
if len(allh):
    for (f, b) in allh:
        del msg[f]
    for (f, b) in allh:
        msg[f] = email.header.make_header(email.header.decode_header(b))

print(msg)

_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to