# -*- coding: cp936 -*-
from urllib import quote
from urllib import unquote
a_urlcode = quote('魔兽')
print a_urlcode
a_decode = unquote(a_urlcode)
print a_decode
test='%E7%BC%96%E7%A0%81%E8%BD%AC%E6%8D%A2'
print unquote(test)
t= '回家发快递'
t.decode('gb2312').encode('utf-8')
print t
from urllib import quote
from urllib import unquote
a_urlcode = quote('魔兽')
print a_urlcode
a_decode = unquote(a_urlcode)
print a_decode
test='%E7%BC%96%E7%A0%81%E8%BD%AC%E6%8D%A2'
print unquote(test)
t= '回家发快递'
t.decode('gb2312').encode('utf-8')
print t