, Urldecode () and rawurldecode () decoded strings are encoded in UTF-8 format, if the URL contains Chinese, and the page setting is not a UTF-8, the decoded string must be converted before it can be properly displayed.
Php tutorial description of Chinese url Codec
In php, urlencode and rawurlencode are encoded in Chinese.
String urlencode (string str)
Returns a string. All non-alphanumeric characters except-_. In this string will be replaced with a semicolon (%) followed by two hexadecimal numbers. This encoding is described in rfc 1738 to protect the original characters from being interpreted as special url delimiters and protect the url format to prevent them from being transmitted to media (like some email systems) chaos During character conversion
*/
$ A = '? A = Chinese ';
$ Urlencode = urlencode ($ );
Echo $ urlencode; // % 3fa % 3d % d6 % d0 % ce % c4
/*
String rawurldecode (string str)
Returns a string of hundreds of semicolons (%) followed by two hexadecimal numbers. All strings are replaced with original characters.
*/
$ C = rawurlencode ($ urlencode); // a % 253d % 25d6% 25d0% 25ce % 25c4;
Echo $ c;
/*
Note that urldecode () and rawurldecode () are decoded in UTF-8 format. If the url contains Chinese characters and the page setting is not UTF-8, the decoded string must be converted before it can be properly displayed.