General: (RomanSyroeshko) GB-265 - PHPExcel_Shared_String.IsUTF8 returns FALSE for Cyrillic UTF-8 input

This commit is contained in:
Mark Baker 2013-11-18 08:00:49 +00:00
parent 7f0a8044a4
commit 30459d260d

View File

@ -403,7 +403,7 @@ class PHPExcel_Shared_String
* @return boolean * @return boolean
*/ */
public static function IsUTF8($value = '') { public static function IsUTF8($value = '') {
return utf8_encode(utf8_decode($value)) === $value; return $string === '' || preg_match('/^./su', $string) === 1;
} }
/** /**