About URL encoding

Source: Internet
Author: User

You will encounter this problem during the development process:

If we want to send the request parameter name plus the request parameter value but the request parameter value itself includes the "/" number, such as www.abcde.com?web=http://www.baidu.com "

At this point the input is not correct.

Now try to verify the URL encoding of reserved characters under various encoding forms

This means that we should pass the arguments when this is true. For most English characters, the various encodings will not change.

However, the Chinese characters are different under various encodings.

So we need to pay attention when we pass the Chinese parameter again.

If we enter the Chinese parameter directly in the browser, the default is UTF-8 encoded.

However, if you send a GET request in a Web page (such as GBK encoded), the final parameter encoding is GBK

Once garbled, we will know how to solve it.

Learning to program should be done by hands to verify the conclusion, understanding 10 times the concept is better than to do it again.

About URL encoding

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.