forked from mirror/django-mailbox
Fix parse UTF-8 filename - close #104
This commit is contained in:
parent
e364369643
commit
f32c0dd245
3 changed files with 92 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue