Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
utf-8:%E4%BD%A0%E5%A5%BD(翻译)
上面这个词的中文意思是'你好',由utf-8编码
我想将它作为 url 中的参数传递,例如“example.com/query=%E4%BD%A0%E5%A5%BD”
但是我得到了 404 响应,而“example.com/query=Hello”运行良好
我只是在网页中显示参数。
有人能帮我吗?
已解决:对不起,我写错了正则表达式...我应该删除这个问题吗?
In [20]: 'http://www.google.com/search?%s' % (urllib.urlencode({'q':'python'})) Out[20]: 'http://www.google.com/search?q=python'