我正在使用 pyodbc 连接到 MS SQL 服务器数据库。我得到的错误如下
invalid byte sequence for encoding "UTF8": 0x93
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
SQL 数据库使用 Latin1 编码,我使用带有 django 的 postgres,它需要 UTF8。
我对使用 pyodbc 很陌生,无法解决这个问题。我试图过滤成堆的谷歌搜索,但没有运气。一些帮助将不胜感激。
编辑
Postgres 数据库是该项目的主要数据库。我希望能够从 SQL Server 中提取数据。虽然这个过程不会经常进行......
发生错误的点来自于从 SQL Server db 读取