#encode
quote("客戶")
#decode
print urllib.unquote('%CF%CA%BB%A8')
#utf8編碼的解碼方法,其中ignore參數可忽略不正確的數據
print de(str).decode("utf8","ignore")
#gbk編碼的解碼方法,其中ignore參數可忽略不正確的數據
print de(str).decode("utf8","ignore")
posted on 2011-12-29 16:53
一凡 閱讀(207)
評論(0) 編輯 收藏 所屬分類:
script