We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 641316b + e65f9fe commit 1269578Copy full SHA for 1269578
lib/triagens/ArangoDb/Connection.php
@@ -538,20 +538,7 @@ private function doBatch($method, $request)
538
*/
539
public static function detect_utf($string)
540
{
541
- if (preg_match(
542
- '%^(?:
543
- [\x09\x0A\x0D\x20-\x7E] # ASCII
544
- | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
545
- | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
546
- | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
547
- | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
548
- | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
549
- | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
550
- | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
551
- )*$%xs',
552
- $string
553
- )
554
- ) {
+ if (preg_match("//u", $string)) {
555
return true;
556
} else {
557
return false;
0 commit comments