使用 dbf, dbfread,simpledbf 均报错。
b = dbfread.read('SJSXX.dbf', 'gb2312')
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/deprecated_dbf.py", line 49, in read
return DeprecatedDBF(filename, load=True, **kwargs)
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/dbf.py", line 136, in __init__
self.load()
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/deprecated_dbf.py", line 18, in load
self[:] = self._iter_records(b' ')
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/dbf.py", line 316, in _iter_records
for field in self.fields]
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/dbf.py", line 316, in <listcomp>
for field in self.fields]
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/field_parser.py", line 79, in parse
return func(field, data)
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/field_parser.py", line 87, in parseC
return self.decode_text(data.rstrip(b'\0 '))
File "/home/zhangyunfang/pymongo_py3/lib/python3.6/site-packages/dbfread/field_parser.py", line 45, in decode_text
return decode_text(text, self.encoding, errors=self.char_decode_errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc9 in position 0: ordinal not in range(128)
求各位大神解答。