UTF-8 xA1xA1 | xACxA3 | ^ Guest | ^ xD3xCExBFxCD | xB9x43xABxC8 what does this mean? DZ (UTF-8) username detection of a regular: xA1xA1 | xACxA3 | ^ Guest | ^ xD3xCExBFxCD | xB9x43xABxC8, what does this paragraph mean, many Chinese and English can not pass. UTF-8 \ xA1 \ xA1 | \ xAC \ xA3 | ^ Guest | ^ \ xD3 \ xCE \ xBF \ xCD | \ xB9 \ x43 \ xAB \ xC8 what does this mean?
A regular expression for DZ (UTF-8) user name detection: \ xA1 \ xA1 | \ xAC \ xA3 | ^ Guest | ^ \ xD3 \ xCE \ xBF \ xCD | \ xB9 \ x43 \ xAB \ xC8. what does this section mean, many Chinese and English characters cannot pass.
File:/Uc_client/model/user. php
Function:Check_username ()
function check_username($username) {
$guestexp = '\xA1\xA1|\xAC\xA3|^Guest|^\xD3\xCE\xBF\xCD|\xB9\x43\xAB\xC8';
$len = $this->dstrlen($username);
if($len > 150 || $len < 3 || preg_match("/\s+|^c:\\con\\con|[%,\*\"\s\<\>\&]|$guestexp/is", $username)) {
return FALSE;
} else {
return TRUE;
}
}
function dstrlen($str) {
if(strtolower(UC_CHARSET) != 'utf-8') {
return strlen($str);
}
$count = 0;
for($i = 0; $i < strlen($str); $i++){
$value = ord($str[$i]);
if($value > 127) {
$count++;
if($value >= 192 && $value <= 223) $i++;
elseif($value >= 224 && $value <= 239) $i = $i + 2;
elseif($value >= 240 && $value <= 247) $i = $i + 3;
}
$count++;
}
return $count;
}
After reading a lot of information on the Internet, many people say,"
\ XA1 \ xA1"Refers to the fullwidth,"
\ XAC \ xA3"Refers to the Chinese character" Xin "? Is that true? what else does it mean?
------ Solution --------------------
Echo "\ xA1 \ xA1
------ Solution --------------------
\ XAC \ xA3
------ Solution --------------------
^ Guest
------ Solution --------------------
^ \ XD3 \ xCE \ xBF \ xCD
------ Solution --------------------
\ XB9 \ x43 \ xAB \ xC8 ";
------ Solution --------------------
------ Solution --------------------
^ Guest
------ Solution --------------------
^ Tourists
------ Solution --------------------
Bytes