Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Commit

Permalink
General: (RomanSyroeshko) GB-265 - PHPExcel_Shared_String.IsUTF8 retu…
Browse files Browse the repository at this point in the history
…rns FALSE for Cyrillic UTF-8 input
  • Loading branch information
Mark Baker committed Nov 18, 2013
1 parent 7f0a804 commit 30459d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/PHPExcel/Shared/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public static function SanitizeUTF8($value)
* @return boolean
*/
public static function IsUTF8($value = '') {
return utf8_encode(utf8_decode($value)) === $value;
return $string === '' || preg_match('/^./su', $string) === 1;
}

/**
Expand Down

0 comments on commit 30459d2

Please sign in to comment.