Skip to content

Enhancement request : parametrize internal decode of VARCHAR2 data in Python 3 #162

@shoyu63

Description

@shoyu63

When there are corrupted data in a VARCHAR2 (for example \x90 in a WINDOWS-1252 database), we can't fetch the corrupted record because of a cx_Oracle internal decode error.
For example:

(<class 'UnicodeDecodeError'>, UnicodeDecodeError('charmap', b'ELLE REVIENDRA VE
RS NOUS - BIEN PLAC\x90\xc9S - ELLE ATTEND SON CLIENT', 36, 37, 'character maps
to <undefined>'), <traceback object at 0x0000000003C6B5C8>)

With Python 3, there is no way in cx_Oracle (v6.2) to specify the "errors" parameter to the decode() that takes place internally.

It might be nice to be able to

  1. set this parameter.
    and/or
  2. bypass the internal "decode" to have a direct access to the binary data of the STRING and FIXED_CHAR fields.

Thank you.
Stéphane

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions