From 74cc881c526c261d9acfc7ccfbaf3a4e7009141e Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 25 Aug 2010 13:31:30 -0600 Subject: [PATCH] Ticket #9201: Treat ISO-8859-1 as windows-1252 --- imp/lib/Contents.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/imp/lib/Contents.php b/imp/lib/Contents.php index e3caf1652..19a019401 100644 --- a/imp/lib/Contents.php +++ b/imp/lib/Contents.php @@ -326,6 +326,14 @@ class IMP_Contents $part = $this->_message->getPart($id); + /* Ticket #9201: Treat 'ISO-8859-1' as 'windows-1252'. 1252 has some + * characters (e.g. euro sign, back quote) not in 8859-1. There + * shouldn't be any issue doing this since the additional code points + * in 1252 don't map to anything in 8859-1. */ + if (strcasecmp($part->getCharset(), 'ISO-8859-1') === 0) { + $part->setCharset('windows-1252'); + } + /* Don't download contents of entire body if ID == 0 (indicating the * body of the main multipart message). I'm pretty sure we never * want to download the body of that part here. */ -- 2.11.0