From b797216c7fa0ccfff6c1ab1a9632ea0de5fbd7e0 Mon Sep 17 00:00:00 2001 From: Manuel Gomez <34234948+lologf@users.noreply.github.com> Date: Thu, 17 Jan 2019 16:55:44 +0100 Subject: [PATCH] Update models.py --- django_mailbox/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 9f7ffc2..a84ac25 100644 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -353,7 +353,7 @@ class Mailbox(models.Model): msg.mailbox = self if 'subject' in message: msg.subject = ( - utils.convert_header_to_unicode(message['subject'])[0:255] + utils.convert_header_to_unicode(unicode(message['subject']).decode('utf-8'))[0:255] ) if 'message-id' in message: msg.message_id = message['message-id'][0:255].strip()