Parameters with special characters are passed through URLs, and special characters are lost.

Source: Internet
Author: User
Some symbols cannot be directly transmitted in the URL. If you want to pass these special symbols in the URL, you need to use their encoding. The encoding format is % plus the characters' ASCII code, that is, a percent sign %, followed by the corresponding characters' ASCII (hexadecimal) code value. For example, the Space Encoding value is "% 20 ".
If no escape character is used, the encoding will be treated as a special character defined in the URL.

The following table lists some special URL symbols and hexadecimal values.
1. In the + URL, the plus sign indicates space % 2B

2. the space in the space URL can be + or encoded as % 20

3./separate directories and subdirectories % 2f

4 .? Separate the actual URL and parameter % 3f

5.% specify special characters % 25

6. # indicates bookmarks % 23

7. & separator between parameters specified in URL % 26

8. = value of the specified parameter in the URL % 3d

ASPCode:
Function replaceparameter (STR)
STR = Replace (STR, "%", "% 25 ")
STR = Replace (STR, "+", "% 2B ")
STR = Replace (STR, "", "% 20 ")
STR = Replace (STR, "/", "% 2f ")
STR = Replace (STR ,"? "," % 3f ")
STR = Replace (STR, "#", "% 23 ")
STR = Replace (STR, "&", "% 26 ")
STR = Replace (STR, "=", "% 3d ")
Replaceparameter = Str
End Function

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.