From f9790f62c66c1e579feb9fa6761b3e9c49544fd9 Mon Sep 17 00:00:00 2001 From: Daniele Cruciani Date: Fri, 29 Nov 2019 15:07:11 +0100 Subject: [PATCH] do not repeat the last step again for fixUTF8 this is a small improvement, but using this function in a loop with large texts it is an improvement --- src/ForceUTF8/Encoding.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ForceUTF8/Encoding.php b/src/ForceUTF8/Encoding.php index 7801ebc..628b487 100644 --- a/src/ForceUTF8/Encoding.php +++ b/src/ForceUTF8/Encoding.php @@ -283,7 +283,6 @@ static function fixUTF8($text, $option = self::WITHOUT_ICONV){ $last = $text; $text = self::toUTF8(static::utf8_decode($text, $option)); } - $text = self::toUTF8(static::utf8_decode($text, $option)); return $text; }