Is it an error in email.Header?

Roman Suzi rnd at onego.ru
Thu Sep 9 06:41:26 EDT 2004


I was using Python module email.Header to decode headers and encountered
problems with some of the headers. One example is given below:

Python 2.3.4 (#1, May 27 2004, 15:48:35)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2

>>> import email.Header
>>> email.Header.decode_header('''=?koi8-r?B?Qm9va3MuUnUgLSDOz9fZyiDTwcrULCDOz9fZxSDTy8nEy8k?= =?koi8-r?B??=''')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/var/tmp/python2.3-2.3.4-root/usr/lib/python2.3/email/Header.py",
line 113, in decode_header
email.Errors.HeaderParseError

While mailers decode Subject just fine... Is it a case of some
standard deviation?


Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -




More information about the Python-list mailing list