]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implment encoding_errors for cx_oracle
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Aug 2019 19:09:37 +0000 (15:09 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 21 Oct 2019 18:20:40 +0000 (14:20 -0400)
commit8ccf0b688e0351a64f30da4969436233c70158dc
tree31e4f203f3459ed9608f5d21f57f18653e00ea65
parentfc193935d2eeeb0cce6f385a6b3de71467d42c07
Implment encoding_errors for cx_oracle

Added dialect-level flag ``encoding_errors`` to the cx_Oracle dialect,
which can be specified as part of :func:`.create_engine`.   This is passed
to SQLAlchemy's unicode decoding converter under Python 2, and to
cx_Oracle's ``cursor.var()`` object as the ``encodingErrors`` parameter
under Python 3, for the very unusual case that broken encodings are present
in the target database which cannot be fetched unless error handling is
relaxed.  The value is ultimately one of the Python "encoding errors"
parameters passed to ``decode()``.

Closes: #4801
Fixes: #4799
Change-Id: I1d542ba367bcd187347c54db1fee815f7890e71c
(cherry picked from commit d76cb7213557c24609a1a75d8c391aea0179562a)
doc/build/changelog/unreleased_13/4799.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py
test/dialect/oracle/test_dialect.py