No longer require/use the charset parameter to Horde_Mime_Viewer objects,
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 6 Oct 2010 16:55:35 +0000 (12:55 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 6 Oct 2010 16:55:35 +0000 (12:55 -0400)
force the use of UTF-8.

framework/Mime_Viewer/lib/Horde/Mime/Viewer/Base.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Deb.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Msexcel.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Mspowerpoint.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Rfc822.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Rpm.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Rtf.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Smil.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Wordperfect.php

index 92641a9..c55ab7e 100644 (file)
@@ -34,9 +34,7 @@ class Horde_Mime_Viewer_Base
      *
      * @var array
      */
-    protected $_required = array(
-        'charset'
-    );
+    protected $_required = array();
 
     /**
      * This driver's display capabilities.
@@ -71,7 +69,6 @@ class Horde_Mime_Viewer_Base
      *                                    rendered.
      * @param array $conf                 Configuration:
      * <pre>
-     * 'charset' - (string) The local UI charset. [REQUIRED]
      * 'temp_file' - (callback) A callback function that returns a temporary
      *               filename.  Is passed one parameter: a prefix string.
      *                DEFAULT: Uses Horde_Util::getTempFile().
index c9eb7ce..26ec3dc 100644 (file)
@@ -90,7 +90,7 @@ class Horde_Mime_Viewer_Deb extends Horde_Mime_Viewer_Base
             '<span ' .
             ($monospace ? 'class="' . $monospace . '">' : 'style="font-family:monospace">') .
             htmlspecialchars($data) . '</span>',
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index 7bc225f..1cec627 100644 (file)
@@ -71,7 +71,7 @@ class Horde_Mime_Viewer_Msexcel extends Horde_Mime_Viewer_Base
 
         return $this->_renderReturn(
             file_get_contents($tmp_out),
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index 336f95f..029fa58 100644 (file)
@@ -74,7 +74,7 @@ class Horde_Mime_Viewer_Mspowerpoint extends Horde_Mime_Viewer_Base
 
         return $this->_renderReturn(
             $data,
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index dd67031..4e96236 100644 (file)
@@ -82,7 +82,7 @@ class Horde_Mime_Viewer_Rfc822 extends Horde_Mime_Viewer_Base
 
         return $this->_renderReturn(
             (empty($header_output) ? '' : ('<div class="fixed mimeHeaders">' . $this->_textFilter(implode("<br />\n", $header_output), 'emails') . '</div>')),
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index 296d32a..d468b48 100644 (file)
@@ -91,7 +91,7 @@ class Horde_Mime_Viewer_Rpm extends Horde_Mime_Viewer_Base
             '<span ' .
             ($monospace ? 'class="' . $monospace . '">' : 'style="font-family:monospace">') .
             htmlspecialchars($data) . '</span>',
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index 4c2c341..f5d5e0c 100644 (file)
@@ -76,7 +76,7 @@ class Horde_Mime_Viewer_Rtf extends Horde_Mime_Viewer_Base
 
         return $this->_renderReturn(
             $data,
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index a3943b3..2d1943b 100644 (file)
@@ -69,7 +69,7 @@ class Horde_Mime_Viewer_Smil extends Horde_Mime_Viewer_Base
 
         return $this->_renderReturn(
             $this->_content,
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }
 
index a7aee86..ec172dd 100644 (file)
@@ -76,7 +76,7 @@ class Horde_Mime_Viewer_Wordperfect extends Horde_Mime_Viewer_Base
 
         return $this->_renderReturn(
             $data,
-            'text/html; charset=' . $this->getConfigParam('charset')
+            'text/html; charset=UTF-8'
         );
     }