diff --git a/src/Fetch/MIME.php b/src/Fetch/MIME.php index b63d72b..4f21616 100644 --- a/src/Fetch/MIME.php +++ b/src/Fetch/MIME.php @@ -37,7 +37,12 @@ public static function decode($text, $targetCharset = 'utf-8') foreach (imap_mime_header_decode($text) as $word) { $ch = 'default' === $word->charset ? 'ascii' : $word->charset; - $result .= iconv($ch, $targetCharset, $word->text); + if (strtoupper($ch) != strtoupper($targetCharset)) { + $result .= iconv($ch, $targetCharset, $word->text); + } + else { + $result .= $word->text; + } } return $result;