[issue1079] decode_header does not follow RFC 2047

Tokio Kikuchi report at bugs.python.org
Mon Sep 27 03:18:21 CEST 2010


Tokio Kikuchi <tkikuchi at users.sourceforge.net> added the comment:

Hi, all

I am against applying these patches because they will insert space separations in re-composed header (with str() function).

Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord 
-> [('Sm', None), ('\xf6', 'iso-8859-1'), ('rg', None), ('\xe5', 'iso-8859-1'), ('sbord', None)]
-> Sm =?iso-8859-1?q?=F6?= rg =?iso-8859-1?q?=E5?= sbord

Instead, I submit a small recipe for decoding non-compliant RFC2047 header where space separation is not properly inserted between encoded_word and us-ascii characters.

Please try!

----------
Added file: http://bugs.python.org/file19026/u2u_decode.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1079>
_______________________________________


More information about the Python-bugs-list mailing list