mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
Cast iso-8859-8-i down to iso-8859-8
Attempt to do a better job than simply treating the email as ASCII
This commit is contained in:
parent
ea0cf58bf1
commit
6f2113a064
1 changed files with 6 additions and 0 deletions
|
|
@ -374,6 +374,12 @@ class Mailbox(models.Model):
|
|||
content_charset = msg.get_content_charset()
|
||||
if not content_charset:
|
||||
content_charset = 'ascii'
|
||||
elif content_charset == 'iso-8859-8-i':
|
||||
content_charset = 'iso-8859-8'
|
||||
logger.warning(
|
||||
"Unhandled encoding %s; interpreting as iso-8859-8",
|
||||
content_charset
|
||||
)
|
||||
try:
|
||||
# Make sure that the payload can be properly decoded in the
|
||||
# defined charset, if it can't, let's mash some things
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue