From 1c3f0b6f0d389e206600bf64c214e5912969841d Mon Sep 17 00:00:00 2001 From: Rafael Calixto Date: Wed, 30 May 2018 18:27:15 -0300 Subject: [PATCH] Update fbcore.py My System works on UTF-8, but my Firebird send me messages in LATIN-1. So I added a handler for errors in the encode function for the application don't break with those messages. --- fdb/fbcore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdb/fbcore.py b/fdb/fbcore.py index c0be40b..765eab7 100644 --- a/fdb/fbcore.py +++ b/fdb/fbcore.py @@ -596,7 +596,7 @@ def exception_from_status(error, status, preamble=None): result = api.fb_interpret(msg, 512, pvector) if result != 0: if PYTHON_MAJOR_VER == 3: - msglist.append('- ' + (msg.value).decode(sys_encoding)) + msglist.append('- ' + (msg.value).decode(sys_encoding, errors = 'replace')) else: msglist.append('- ' + msg.value) else: