Just think of the hidden URL of the% hexadecimal number, read some asked what to use this encoding solution, this is clear. It is said online to be compatible with some devices that only support ASCII code. I feel this explanation is a bit far-fetched, everyone think ...
My doubts are: for such a hexadecimal number, the server is how to parse such a URL. How does the server determine what encoding this hexadecimal number represents?
%b7%fe%ce%f1%c6%f7%c8%e7. Like such a string, how the server resolves whether it is UTF8 encoded or GBK or GB2321 ...
Reply to discussion (solution)
UrlDecode
The coding of UTF-8 and GBK is differentiated from signature to identification.
Can you explain in detail what the difference is?
URL encoding, which will be decoded by the Web server's implicit execution UrlDecode
As for what is passed, it needs to be interpreted by the application
This is not related to the server. is the browser interpretation code, to unify the same urlencode processing it. Guess, a water doll.
nn. Understanding the application is a problem. But still do not know how to determine the encoding format: Another question, like this code, in the client should be implemented with JS, to the background with the background code parsing, which means that the two ends of the coding to be unified, this is not difficult to do, or the problem, how to determine what code?
Different browsers, in the URL address of the Chinese language, there will be different results. Some are GBK, some are UTF-8, in order to prevent the inconvenience caused by the automation of the browser, the Chinese most first to use urlencode processing, the receiving end with UrlDecode to deal with.
PHP has a method for detecting character sets, but it is not very accurate and should not be overly desired.