diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index e382678..b679bac 100755 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -523,7 +523,7 @@ protected function processStructure($structure, $partIdentifier = null) if (!empty($parameters['charset']) && $parameters['charset'] !== self::$charset) { $mb_converted = false; if (function_exists('mb_convert_encoding')) { - if (!in_array($parameters['charset'], mb_list_encodings())) { + if (!in_array(strtoupper($parameters['charset']), array_map('strtoupper', mb_list_encodings()))) { if ($structure->encoding === 0) { $parameters['charset'] = 'US-ASCII'; } else {