一.咱们经常会遇到浏览器给encode后的url,如何转换成咱们都能识别的url呢?很简单,talk is easy,Please show me your code,如下所示: (1)英文decode url='https://www.jyall.com/authorize?response_type=code&client_id=tg83cslIky&state=null&redirect_uri=https%3A%2F%2Fycapi.ele.me%2Fsso%2Fnapos
python读入中文文本编码错误 python读入中文txt文本: #coding:utf-8 def readFile(): fp = open('emotion_dict//neg//neg_all_dict.txt','r') list = [] for line in fp: list.append(line) fp.close() print(list) readFile() 但是有时候会出现错误提示: UnicodeDecodeError: 'gbk' codec can't dec