Convert charset if viewing inline.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 11 Nov 2008 20:06:05 +0000 (13:06 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 11 Nov 2008 20:06:05 +0000 (13:06 -0700)
imp/lib/Mime/Viewer/plain.php

index 283715b..873fe2d 100644 (file)
@@ -29,6 +29,9 @@ class IMP_Horde_Mime_Viewer_plain extends Horde_Mime_Viewer_plain
             return array();
         }
 
+        // Convert to the local charset.
+        $text = String::convertCharset($text, $this->_mimepart->getCharset());
+
         // If requested, scan the message for PGP data.
         if (!empty($conf['utils']['gnupg']) &&
             $prefs->getValue('pgp_scan_body') &&
@@ -57,7 +60,7 @@ class IMP_Horde_Mime_Viewer_plain extends Horde_Mime_Viewer_plain
         $filters = array(
             'text2html' => array(
                 'parselevel' => TEXT_HTML_MICRO,
-                'charset' => $this->_mimepart->getCharset()
+                'charset' => NLS::getCharset()
             ),
             'tabs2spaces' => array()
         );