1
lianghai 2012-04-26 12:43:02 +08:00
|
2
eerie 2012-04-26 12:43:21 +08:00
urlencode
|
3
lianghai 2012-04-26 12:44:12 +08:00
另外,维基百科 URL 里的 percent-encoding 是由 UTF-8 转出的。
|
4
9hills 2012-04-26 12:44:35 +08:00
|
5
benzhe 2012-04-26 12:47:31 +08:00
url 里的就叫 url encode , javascript 就有相关加解码函数:
decodeURI("%E5%88%B0%E6%AD%A4%E4%B8%80%E6%B8%B8%2C+%E5%BF%83%E6%83%85%E5%A6%82%E4%BD%95.."); |
6
clino 2012-04-26 14:22:19 +08:00
看起来是 utf8 进行 quote 以后得到的
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> print urllib.unquote("%E5%88%B0%E6%AD%A4%E4%B8%80%E6%B8%B8%2C+%E5%BF%83%E6%83%85%E5%A6%82%E4%BD%95") 到此一游,+心情如何 >>> |
7
reus 2012-04-26 16:06:55 +08:00
+号要转成空格
|