Skip to content

Commit

Permalink
Merge pull request #20 from mart1nl/master
Browse files Browse the repository at this point in the history
Fixed a bug in _decode_header function
  • Loading branch information
keitaoouchi committed Jan 4, 2015
2 parents 48f8758 + 46597ec commit dc04e9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion easyimap/easyimap.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ def _decode_header(data):
if charset:
headers.append(unicode(decoded_str, charset))
else:
headers.append(unicode(decoded_str))
encoding = chardet.detect(decoded_str)
headers.append(unicode(decoded_str, encoding['encoding']))
return "".join(headers)


Expand Down

0 comments on commit dc04e9e

Please sign in to comment.