Charset and encoding support is now working again :-)
[squirrelmail.git] / functions / i18n.php
index 238221936aef857c614a2fab3bd03ab2ee193e1b..30894d0115a49ba09d9f88c315195e25b623ed20 100644 (file)
 
    // Decodes a string to the internal encoding from the given charset
    function charset_decode ($charset, $string) {
+      global $debug_mime;
+
       // All HTML special characters are 7 bit and can be replaced first
       $string = htmlspecialchars ($string);
 
       $charset = strtolower($charset);
 
+      if ($debug_mime) $string = $charset.":".$string;
+
       if (ereg("iso-8859-(.*)", $charset, $res)) {
          if ($res[1] == "1")
             return charset_decode_iso_8859_1 ($string);