python里面的几个编码函数
摘要:时不时的被编码折腾一下>>> print urllib.quote('中国') %E4%B8%AD%E5%9B%BD>>> s = '%E4%B8%AD%E5%9B%BD'>>> print urllib.unquote(s).decode('utf8')中国>>> s=urllib.quote('中国').encode('utf8') >>> print s%E4%B8%AD%E5%9B%BD>>> s=u
阅读全文
posted @ 2014-01-14 21:57
浙公网安备 33010602011771号