1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Fix parse UTF-8 filename - close #104

This commit is contained in:
Adam Dobrawy 2016-06-30 15:36:54 +02:00
parent e364369643
commit f32c0dd245
3 changed files with 92 additions and 0 deletions

View file

@ -65,6 +65,9 @@ def get_settings():
def convert_header_to_unicode(header):
default_charset = get_settings()['default_charset']
if six.PY2 and isinstance(header, six.text_type):
return header
def _decode(value, encoding):
if isinstance(value, six.text_type):
return value