Python 编码中最常见同时也是最顽固的两个错误:
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1: ordinal not in range(128)
UnicodeDecodeError: ‘utf-8’ codec can’t decode bytes in position 0-1: invalid continuation byte
解决方法:
#-*- coding : utf-8-*-
# coding:unicode_escape