From ea0cf58bf1a7564c727423c8a18e799b22b749b5 Mon Sep 17 00:00:00 2001 From: ptav <7433752+ptav@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:03:59 +0100 Subject: [PATCH] Partially handles iso-8859-8-i encoding Casts it to iso-8859-8 but message will still create challenges downstream where it gets treated as pure ASCII while generating a warning --- django_mailbox/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django_mailbox/utils.py b/django_mailbox/utils.py index 5805211..de624a8 100644 --- a/django_mailbox/utils.py +++ b/django_mailbox/utils.py @@ -78,6 +78,8 @@ def convert_header_to_unicode(header): return value if not encoding or encoding == 'unknown-8bit': encoding = default_charset + elif encoding == 'iso-8859-8-i': + encoding = 'iso-8859-8' return value.decode(encoding, 'replace') try: