浏览代码

encodingfixes by Marc

Thijs Kinkhorst 22 年之前
父节点
当前提交
102687490e
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 3 0
      functions/imap_general.php
  2. 1 1
      functions/mime.php

+ 3 - 0
functions/imap_general.php

@@ -449,6 +449,9 @@ function parseAddress($address, $max=0, $addr_ar = array(), $group = '', $host='
         switch ($char) {
             case '=':
                 if (preg_match('/^(=\?([^?]*)\?(Q|B)\?([^?]*)\?=)(.*)/Ui',substr($address,$pos),$reg)) {
+		    if (!$personal) {
+			$personal = substr($address,0,$pos);
+		    }
                     $personal .= $reg[1];
                     $pos += strlen($personal);
                 }

+ 1 - 1
functions/mime.php

@@ -564,7 +564,7 @@ function decodeHeader ($string, $utfencode=true,$htmlsave=true) {
         $encoded = false;
         $aString[$i] = '';
         while (preg_match('/^(.*)=\?([^?]*)\?(Q|B)\?([^?]*)\?=(.*)$/Ui',$chunk,$res)) {
-            //$aString[$i] .= $res[1];
+            $aString[$i] .= $res[1];
 	    //echo "$chunk match ". $res[5] . "<br>";
             $encoding = ucfirst($res[3]);
             switch ($encoding)