Firefox URL Encoding

Source: Internet
Author: User

For example, when a user enters a keyword on the page, the submitted URL is: www.xxx.com/search.aspx? Q = Chinese

After you press enter in the address bar, ie, opera, and chrome will be displayed normally.

Firefox has garbled characters because Firefox's content mechanism is faulty. Net's server. urlencode and httputility. urlencode are ineffective.

Later, I went online and looked for a saying that I could use server. urlencode and httputility. urlencode to compile the second code. After the test, it was OK,

For example, server. urlencode (server. urlencode (this. Key. Text. Trim () is encoding. If it is decoded, it will be OK once,

Httputility. urlencode (httputility. urlencode (this. Key. Text. Trim (), encoding. getencoding ("gb2312 ")));

Httputility. urlencode is also an OK solution. The encoding here is the same as that of my netizens.

You can also use the JS escape () method to solve this problem. I don't know if anyone has encountered or has any other solutions. Thank you.

 

 

Edit from 2012-02-21

I entered the keyword and encoded it using the JS escape method. Then I used the webmaster tool to search for the SPIDER and robot simulation tools and found that the list was not captured. The reason was that the encoding problem could not be changed to encodeuricomponent.

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.