参考:HTML URL Encoding Reference
URL Encoding (Percent Encoding)
URL encoding converts characters into a format that can be transmitted over the Internet.
URLs can only be sent over the Internet using the ASCII character-set.
Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format.
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits.
URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.
总结:
1. URL只能传ASCII码,URL不能包含空格。
2. 超出ASCII码范围的如何操作?对URL进行编码,将URL编码成所有字符都是ASCII码范围内。