Fix an issue with decoding of some unicode subjects. THanks to pistolero for reviewing the previous patch and providing a fix.

This commit is contained in:
Ross Poulton 2011-02-02 08:02:39 +00:00
parent 8435a665b1
commit ef1fdbc399

View File

@ -133,7 +133,7 @@ def decodeUnknown(charset, string):
return string.decode('utf-8')
except:
return string.decode('iso8859-1')
return unicode(string)
return unicode(string, charset)
def decode_mail_headers(string):
decoded = decode_header(string)