MailWatch界面显示utf8主题

vi functions.php

找到

case 'subject':
 $row[$f] = decode_header($row[$f]);
 $row[$f] = htmlspecialchars($row[$f]);
 if(SUBJECT_MAXLEN>0) {
 $row[$f] = trim_output($row[$f], SUBJECT_MAXLEN);
 }
 break;
改成
case 'subject':
 $row[$f] = mb_convert_encoding(decode_header($row[$f]), 'utf-8', 'utf-8, big5, gb2312, gbk');
 $row[$f] = htmlspecialchars($row[$f]);
 if(SUBJECT_MAXLEN>0) {
 $row[$f] = trim_output($row[$f], SUBJECT_MAXLEN);
 }

 break;

vi detail.php

找到

if ($fieldn == "To:" || $fieldn == "Subject:") {
 $row[$f] = htmlspecialchars($row[$f]);
}
改成
if ($fieldn == "To:") {
 $row[$f] = htmlspecialchars($row[$f]);
}
找到
if ($fieldn == "Subject:") {
 $row[$f] = decode_header($row[$f]);
 $row[$f] = htmlspecialchars($row[$f]);
}
改成
if ($fieldn == "Subject:") {
 $row[$f] = decode_header($row[$f]);
 $row[$f] = htmlspecialchars($row[$f],ENT_COMPAT,'utf-8');

}

上一篇:

Comments