fixed Issue 1555:imap: default string field represent ignores encoding, thanks Alan

This commit is contained in:
mdipierro committed 2013-06-23 08:47:51 -05:00
1 parent b0d8a0f0c7
commit bb78217f44
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -1 +1 @@
Version 2.5.1-stable+timestamp.2013.06.23.08.45.09 Version 2.5.1-stable+timestamp.2013.06.23.08.47.09
+2
View File
@@ -6071,6 +6071,8 @@ class IMAPAdapter(NoSQLAdapter):
def header_represent(f, r): def header_represent(f, r):
from email.header import decode_header from email.header import decode_header
text, encoding = decode_header(f)[0] text, encoding = decode_header(f)[0]
if encoding:
text = text.decode(encoding).encode('utf-8')
return text return text
def encode_text(self, text, charset, errors="replace"): def encode_text(self, text, charset, errors="replace"):