我正在编写一个小的Python应用程序,从Firebird数据库中读取数据。我使用的是fdb 1.8和Firebird Embedded 2.5。
我无法解码以下字符串:
//centrale/Danea Easyfatt/ANYMA 2017 dal 06-02-17.eft
我不停地收到这个异常:
Traceback (most recent call last):
File "C:\Matteo\PyCharm\CMakeR\God.py", line 165, in openDBFromMenu
self.openDB(False)
File "C:\Matteo\PyCharm\CMakeR\God.py", line 147, in openDB
while (self.dbManager.connectTo(path)==False):
File "C:\Matteo\PyCharm\CMakeR\DBManager.py", line 36, in connectTo
charset="WIN1252"
File "C:\Matteo\PyCharm\CMakeR\venv\lib\site-packages\fdb\fbcore.py", line 736, in connect
"Error while connecting to database:")
File "C:\Matteo\PyCharm\CMakeR\venv\lib\site-packages\fdb\fbcore.py", line 562, in exception_from_status
msglist.append('- ' + (msg.value).decode('utf_8'))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 38: invalid continuation byte
我该怎么办?
我已经尝试了WIN1252和其他格式的解码和编码。
我很困惑。