HTTP URLEncoding

本文详细介绍了URL中如何对特殊字符进行编码转换,确保其能在互联网上正确传输。文章提供了ASCII字符集内各符号及其对应的编码形式,对于小于32及大于127的不可见字符,采用%xx的形式进行转义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 


HTTP URLs can only be sent over the Internet using the ASCII character-set, which often contain characters outside the ASCII set. So these unsafe characters must be replaced with a% followed by two hexadecimal digits.

The following table shows the ASCII symbols of the characters and their replacements which can be used in the URL before passing it to the server:

 

ASCIISymbolReplacement
< 32 Encode with %xx where xx is the hexadecimal representation of the character.
32space+ or %20
33!%21
34"%22
35#%23
36$%24
37%%25
38&%26
39'%27
40(%28
41)%29
42**
43+%2B
44,%2C
45--
46..
47/%2F
4800
4911
5022
5133
5244
5355
5466
5577
5688
5799
58:%3A
59;%3B
60<%3C
61=%3D
62>%3E
63?%3F
64@%40
65AA
66BB
67CC
68DD
69EE
70FF
71GG
72HH
73II
74JJ
75KK
76LL
77MM
78NN
79OO
80PP
81QQ
82RR
83SS
84TT
85UU
86VV
87WW
88XX
89YY
90ZZ
91[%5B
92\%5C
93]%5D
94^%5E
95__
96`%60
97aa
98bb
99cc
100dd
101ee
102ff
103gg
104hh
105ii
106jj
107kk
108ll
109mm
110nn
111oo
112pp
113qq
114rr
115ss
116tt
117uu
118vv
119ww
120xx
121yy
122zz
123{%7B
124|%7C
125}%7D
126~%7E
127 %7F
> 127 Encode with %xx where xx is the hexadecimal representation of the character.

转载于:https://www.cnblogs.com/hephec/p/4556950.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值