From 30459d260d69f516bf986ea649abb93a96d719d6 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 18 Nov 2013 08:00:49 +0000 Subject: [PATCH] General: (RomanSyroeshko) GB-265 - PHPExcel_Shared_String.IsUTF8 returns FALSE for Cyrillic UTF-8 input --- Classes/PHPExcel/Shared/String.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Shared/String.php b/Classes/PHPExcel/Shared/String.php index 3ba1be26..6fe9eb96 100644 --- a/Classes/PHPExcel/Shared/String.php +++ b/Classes/PHPExcel/Shared/String.php @@ -403,7 +403,7 @@ class PHPExcel_Shared_String * @return boolean */ public static function IsUTF8($value = '') { - return utf8_encode(utf8_decode($value)) === $value; + return $string === '' || preg_match('/^./su', $string) === 1; } /**