1 in Mime_Helper::getCharacterSet() if the email cis multipart/mixed and contains
2 only one subpart, take the charset from that first part, rather from primary
5 --- eventum-20060725/include/class.mime_helper.php 2006-07-26 11:29:55.240578707 +0300
6 +++ include/class.mime_helper.php 2006-07-26 14:20:18.000000000 +0300
11 - $content_type = @$structure->headers['content-type'];
12 + if ($structure->ctype_primary == 'multipart' and $structure->ctype_secondary == 'mixed'
13 + and count($structure->parts) == 1) {
14 + $content_type = $structure->parts[0]->headers['content-type'];
16 + $content_type = @$structure->headers['content-type'];
19 if (preg_match('/charset\s*=\s*(["\'])?([-\w\d]+)(\1)?;?/i', $content_type, $matches)) {