Replies: 1 comment 5 replies
-
I'm going to leave the typehandler question to @anthony-tuininga to look at. A simple testcase for me works in cx_Oracle but not in python-oracledb. But regarding the intent of the code snippet, what's the actual column type of |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I posted this question on StackExchange yesterday as well, but figured it would make sense to ask here as well.
I'm struggling to deal with what I think is corrupt data stored in an Oracle database when reading it in a python script. I have the following:
When I run this, I'm getting the following:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 647: invalid continuation byte
If I run this directly in SQL Developer, I get an output, with � in the file content. My SQL Developer settings are set to
UTF-8
, and my Oracle databaseNLS_NCHAR_CHARACTERSET
is set toAL32UTF8
. My understanding with theoutputtypehandler
change is that my python script would also output a � in this instance.I added some
print()
commands inside of thedef output_type_handler()
to verify that it is indeed being called, and I saw output, so it appears that it is, but it also seems like theencoding_errors="replace"
is being ignored. What am I missing here? Thanks!Beta Was this translation helpful? Give feedback.
All reactions