For URL encoding, rfc1738 provides the following rules:
"Only alphanumerics [0-9a-za-z], the special characters" $-_. +! * '(), "[Not including the quotes-ed], and reserved Characters Used for their reserved purposes may be used unencoded within a
[ASP. NET Web API tutorial] 5.2 send HTML form data: URL-encoded form data, api5.2
Note: This article is part of the [ASP. NET Web API series tutorial]. If this is the first time you read this series of tutorials, read the previous content first.5.2
Complete URL Chinese Encoding
I thought this would work.
Public static string strtourl (string Str ){String result = NULL;Try {Result = urlencoder. encode (STR, "UTF-8"); // gb2312} Catch (unsupportedencodingexception e ){// Todo auto-generated
This is a creation in
Article, where the information may have evolved or changed.
Package URL
Import "Net/url"
The URL package resolves the URL and implements the query's escape code, see RFC 3986.
Index
Func Queryescape (s string) string
Special character escaping encoding in URL URLsDecember 29, 2017 09:10:57Hits:Special character escaping encoding in URL URLsCharacter-URL encoded valueSpaces-%20"-%22#-%23%-%25&-%26(-%28)-%29+-%2B,-%2c/-%2F:-%3a; -%3b=-%3d>-%3e? -%3f@-%40\-%5C|
API Documentation Section@Target ({elementtype.parameter, Elementtype.method, Elementtype.field}) @Retention (retentionpolicy.runtime) public @interface Formparam { /** * Defines the name of the form parameter whose value would be used *
If an encoding is required, it indicates that this is not suitable for transmission. There are a variety of reasons, such as a large size that contains private data. For a URL, encoding is required because some characters in the URL may cause
Http://www.imkevinyang.com/2009/08/%E8%AF%A6%E8%A7%A3javascript%E4%B8%AD%E7%9A%84url%E7%BC%96%E8%A7%A3%E7%A0%81.htmlSummaryIn this paper, we mainly introduce the related problems of URI codec, and explain in detail which characters in URL coding
Before we begin to discuss coding decoding, let's be clear about the problem.
What is a application/x-www-form-urlencoded string.
A: It is a type of encoding. These characters are converted to application/x-www-form-urlencoded strings when the URL
For example, in a URL parameter string, the Key=value key value is used to pass the argument, and the key value pairs are separated by & symbols, such as/s?q=abc&ie=utf-8. If your value string contains = or, it is bound to result in a server parsing
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.