mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.95k stars 563 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xae in position 4094: invalid start byte #1154

Closed blackjackgg closed 1 year ago

blackjackgg commented 1 year ago

using cursor.fetchall() then throw this error below is a way to template solve this problem,change default decode to ignore mode

import codecs def strict_handler(exception): return u"", exception.end codecs.register_error("strict", strict_handler)