You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug on "processStructure" in the class Message
Some charsets are not declared with caps, which can lead to improper check by the function in_array on mb_list_encodings()... This can be corrected using strtoupper :
I found an improvement on "decode" in the class MIME... Sometimes the charset in subjects are badly declared and wrongly interpreted as ASCII, and conversion can be handled doing like this :
public static function decode($text, $targetCharset = 'UTF-8')
{
if (null === $text) {
return null;
}
$result = '';
foreach (imap_mime_header_decode($text) as $word) {
$ch = 'default' === $word->charset ? 'ascii' : $word->charset;
if ($ch==="ascii" && ($c=strtoupper(mb_detect_encoding($word->text)))!==strtoupper($ch)) {
$ch=$c;
}
$result .= iconv($ch, $targetCharset, $word->text);
}
return $result;
}
The text was updated successfully, but these errors were encountered:
I found a bug on "processStructure" in the class Message
Some charsets are not declared with caps, which can lead to improper check by the function in_array on mb_list_encodings()... This can be corrected using strtoupper :
I found an improvement on "decode" in the class MIME... Sometimes the charset in subjects are badly declared and wrongly interpreted as ASCII, and conversion can be handled doing like this :
The text was updated successfully, but these errors were encountered: