On 10/25/2019 4:52 PM, DFS wrote:
=?iso-8859-9?b?T/B1eg==?= <[email protected]>
=?utf-8?Q?=EB=AF=B8?= <[email protected]>
=?GBK?B?0Pu66A==?= <[email protected]>
=?UTF-8?B?zp3Or866zr/PgiDOks6tz4HOs86/z4I=?= <[email protected]>
How does something like:
from email.header import decode_header
def test(s):
print(s)
s2 = decode_header(s)
print(s2[0][0])
print(s2[1][0].strip())
test('=?iso-8859-9?b?T/B1eg==?= <[email protected]>')
test('=?utf-8?Q?=EB=AF=B8?= <[email protected]>')
test('=?GBK?B?0Pu66A==?= <[email protected]>')
test('=?UTF-8?B?zp3Or866zr/PgiDOks6tz4HOs86/z4I=?=
<[email protected]>')
work?
Arne
--
https://mail.python.org/mailman/listinfo/python-list