Skip to content

encoding error for BLOB SUB TYPE TEXT #74

Description

@holev45

Hi.
For encoding text driver uses charset send in connect string and this can be wrong.
I use UTF8 and almost everything works fine - except BLOB TEXT, when change to WIN1250/cp1250 almost everything goes wrond except the BLOB TEXT. To correct this I extend line 3856 in: src/firebird/driver/core.py
from:
value = value.decode(self._encoding)

to:
try:
value = value.decode(self._encoding)
except:
value = value.decode(CHARSET_MAP.get(self._connection.info.charset))

Mostly because I didnt find better solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions