UTF-8 xA1xA1 | xACxA3 | ^ Guest | ^ xD3xCExBFxCD | xB9x43xABxC8 what does this mean? How to solve

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.