UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 23: invalid start byte

1.  编译的时候遇到一个错误

Traceback (most recent call last):
  File "F:/PROJ_1/cat1_code/idh/idh.code/components/atr/src/gperf2h.py", line 60, in <module>
    sys.exit(main(sys.argv[1:]))
  File "F:/PROJ_1/cat1_code/idh/idh.code/components/atr/src/gperf2h.py", line 32, in main
    for line in fh.readlines():
  File "codecs.py", line 321, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 23: invalid start byte

2. 说是编码的问题。

说是修改成 

with open(args.input, 'r', encoding='UTF-8') as fh:
然后似乎没啥用处
posted @ 2020-09-28 14:42  429512065  阅读(665)  评论(0编辑  收藏  举报