|
|
@ -2396,7 +2396,11 @@ class rcube_imap
|
|
|
|
|
|
|
|
|
|
|
|
if (!$skip_charset_conv) {
|
|
|
|
if (!$skip_charset_conv) {
|
|
|
|
if (!$o_part->charset || strtoupper($o_part->charset) == 'US-ASCII') {
|
|
|
|
if (!$o_part->charset || strtoupper($o_part->charset) == 'US-ASCII') {
|
|
|
|
$o_part->charset = $this->default_charset;
|
|
|
|
// try to extract charset information from HTML meta tag (#1488125)
|
|
|
|
|
|
|
|
if ($o_part->ctype_secondary == 'html' && preg_match('/<meta[^>]+charset=([a-z0-9-]+)/i', $body, $m))
|
|
|
|
|
|
|
|
$o_part->charset = strtoupper($m[1]);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
$o_part->charset = $this->default_charset;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$body = rcube_charset_convert($body, $o_part->charset);
|
|
|
|
$body = rcube_charset_convert($body, $o_part->charset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|