Skip to content

Commit

Permalink
Merge pull request PHPOffice#1 from RomanSyroeshko/PHPExcel#265
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Syroeshko authored and Roman Syroeshko committed Nov 8, 2013
2 parents ded0f6d + b21a509 commit f973f1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/PHPExcel/Shared/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit f973f1a

Please sign in to comment.