Add ignore 0x09, 0x0a, 0x0d
This commit is contained in:
11
cmpUtil.php
11
cmpUtil.php
@@ -84,8 +84,12 @@
|
||||
function decodeJSON($str, $d = 0) {
|
||||
$m = array();
|
||||
|
||||
// eq '/[[:cntrl:]]/u';
|
||||
$re = '/[\x00-\x1F\x7F]/u';
|
||||
// eq '/[[:cntrl:]]/u';
|
||||
// $re = '/[\x00-\x1F\x7F]/u';
|
||||
// Add ignore 0x09, 0x0a, 0x0d
|
||||
$re = '/[\x00-\x08\x0b-\x0c\x0e-\x1F\x7F]/u';
|
||||
|
||||
// $ign = array("0x09", "0x0a", "0x0d");
|
||||
|
||||
if(preg_match_all($re, $str, $m)) {
|
||||
$tr = array();
|
||||
@@ -98,6 +102,9 @@
|
||||
|
||||
$hex = "0x" . bin2hex($bin);
|
||||
|
||||
// if(in_array($hex, $ign))
|
||||
// continue;
|
||||
|
||||
$tr[$bin] = $hex;
|
||||
|
||||
if($d)
|
||||
|
Reference in New Issue
Block a user