[摘] python url decoder
# -*- coding: utf8 -*-
#! python
print(repr("測試報警,xxxx是大豬頭".decode("UTF8").encode("GBK")).replace("\\x","%"))
注意第一個 decode("UTF8") 要與文件聲明的編碼一樣。
# -*- coding: utf8 -*-
#! python
print(repr("測試報警,xxxx是大豬頭".decode("UTF8").encode("GBK")).replace("\\x","%"))
注意第一個 decode("UTF8") 要與文件聲明的編碼一樣。