Internationalised email subjects
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Jun 22 23:26:11 EDT 2007
En Fri, 22 Jun 2007 06:49:22 -0300, <bugmagnet at gmail.com> escribió:
> I've tried removing the encode('GB2312') line, so the code looks like
> this:
>
> h = Header(subject, 'GB2312')
>
> However, this line still causes the following error message:
>
> Traceback (most recent call last):
> File "/home/web88/html/app/sendmail.py", line 314, in
> h = Header(subject, 'GB2312')
> File "/usr/lib/python2.2/email/Header.py", line 188, in __init__
> self.append(s, charset, errors)
> File "/usr/lib/python2.2/email/Header.py", line 272, in append
> ustr = unicode(s, incodec, errors)
> LookupError: unknown encoding: gb2312 )
It appears that you don't have the gb2312 codec - maybe it was not
available with your rather old Python version (2.2). Upgrading to a newer
version may help.
--
Gabriel Genellina
More information about the Python-list
mailing list