git.droids-corp.org
/
imapami.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
utils: fix exception with bad encoding
[imapami.git]
/
imapami
/
utils.py
diff --git
a/imapami/utils.py
b/imapami/utils.py
index
4af970c
..
375910c
100644
(file)
--- a/
imapami/utils.py
+++ b/
imapami/utils.py
@@
-74,7
+74,7
@@
def headers_to_unicode(headers):
# fallback to wrong decoding
value, encoding = hdr, 'utf-8'
if encoding is None:
- value = unicode(value)
+ value = unicode(value
, errors="replace"
)
else:
value = value.decode(encoding, errors="replace")
unicode_headers[key] = value