标签:
"UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xe9 in position 0: ordinal not in range(128)"
解决办法,在该python文件的前面加上如下几句,问题得到解决
#!/usr/bin/env python
# -*- coding:utf8 -*-
import sys
default_encoding = ‘utf-8‘
if sys.getdefaultencoding() != default_encoding:
reload(sys)
sys.setdefaultencoding(default_encoding)
python 处理中文时出现的错误'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)" 解决方法
标签:
原文地址:http://www.cnblogs.com/Bob-FD/p/4422257.html