遇到个问题,记录一下
python3中输出的问题:
UnicodeEncodeError: 'gbk' codec can't encode character '\xd0' in position 2: illegal multibyte sequence
解决方法:
import io import sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')