UTF-8 's \xa1\xa1|\xac\xa3|^guest|^\xd3\xce\xbf\xcd|\xb9\x43\xab\xc8 What does this mean?
DZ (UTF-8) User name detection of a regular: \XA1\XA1|\XAC\XA3|^GUEST|^\XD3\XCE\XBF\XCD|\XB9\X43\XAB\XC8, what this paragraph means, a lot of Chinese and English can not 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 > | | $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 >= && $value <= 247) $i = $i + 3;
}
$count + +;
}
return $count;
}
See a lot of information on the Internet, many people say "
\xa1\xa1"refers to the full angle,"
\xac\xa3"refers to the Chinese character" Xin "? Is that what the others are referring to?
------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--------------------
笴