diff --git a/Classes/PHPExcel/Shared/String.php b/Classes/PHPExcel/Shared/String.php index 3ba1be262..9ed18ba6a 100644 --- a/Classes/PHPExcel/Shared/String.php +++ b/Classes/PHPExcel/Shared/String.php @@ -397,13 +397,13 @@ public static function SanitizeUTF8($value) } /** - * Check if a string contains UTF8 data + * Check if a string contains UTF-8 data * * @param string $value * @return boolean */ public static function IsUTF8($value = '') { - return utf8_encode(utf8_decode($value)) === $value; + return $value === '' || preg_match('/^./su', $value) === 1; } /**