I have a word-encoded string from received mail. When parsing encoded word in Python3, I got an exception
'gb2312' codec can't decode bytes in position 18-19: illegal multibyte sequence
raised from make_header method.
from email.header import decode_header, make_header
hdr = decode_header("""=?gb2312?B?QSBWIM34IMXMILP2IMrbICAgqEMgs8kgyMsg?=""")
make_header(hdr)
Parsing encoded string in online tools works without problems (http://dogmamix.com/MimeHeadersDecoder/). Any suggestions what I am doing wrong? Thanks