Python字符串的encode与decode研究心得——解决乱码问题 2020/12/12 | 博客 | 评论(0) | 阅读(79) 为什么Python使用过程中会出现各式各样的乱码问题,明明是中文字符却显示成“/xe4/xb8/xad/xe6/x96/x87”的形式? 为什么会报错“UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1: ordinal not in range(128)”? 为啥’gb2312’ codec can’t decode byte 0x95 本文就来研究一下这个问...