Httputility. urlencode method:
Encode the URL string to implement reliable HTTP transmission from the Web server to the client.
Reload listConverts byte arrays to encoded URL strings for reliable HTTP transmission from the Web server to the
Call a download program today. When the downloaded URL contains Chinese characters, it cannot be downloaded, for example:
Http://www.huachu.com.cn/itbook/booklist.asp? Tsmc = assembly
I will use the Server. UrlEncode function in. net for conversion.
Notes:1. httputility. urlencode and httputility. urldecode are static methods, while server. urlencode and server. urldecode are instance methods.2. Server is an instance of the httpserverutility class and a property of system. Web. UI. Page.3.
UrlEncode: Refers to the URL of the Web page in the Chinese characters of an encoding conversion, the most common is Baidu, Google and other search engines in the input of English Query time, generated through the Encode page URL.
UrlEncode
Parameters on the latest website include Chinese characters, for example:
Http://www.chinapoesy.com/Tag%b0% AE %c7%e9.html
Server. urlencode has already been used. However, some Chinese characters cannot be found in URL rewriting, so there is no
Parameters on the latest website include Chinese characters, for example:
Http://www.chinapoesy.com/Tag%b0% AE %c7%e9.html
Server. urlencode has already been used. However, some Chinese characters cannot be found in URL rewriting, so there is no
Server. urlencode MethodThe URL encoding rules will be applied to a string, including escape characters.
Urlencode converts the following characters:
Space () is converted to the plus sign (+)
Non-alphanumeric characters are converted to their
The following is reproduced from:
Http://hi.baidu.com/yisqiu/blog/item/e0804bfb9243fb67024f5624.html
Which one should I use for URL encoding? Are there any differences between these two methods?Test:String file = "file (upload document .doc
The same server. urlencode has different encoded characters on different pages. Later, I checked the original characters ..
Which one should I use for URL encoding? Are there any differences between these two methods?Test:String file = "file
Today, a friend sent a message to ask about the urlencode encoding result of another person, which is different from his own. The situation is as follows:
The result returned by someone else's server. urlencode ("Sony") is % CB % F7 % c4 % E1
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.