I am getting decoding error while using pd.read_sql.I am querying Oracle DB , and using cx_oracle library.
I have tried passing the encoding parameter in the Oracle Connection String as below.
cx_oracle.connect(user=user_name, password=pwd, dsn=dsn_tns,encoding="UTF-8")
The encoding options i have tried and error i am getting everytime pd.read_sql runs is as below:
With encoding = 'UTF-8', error is utf-8' codec can't decode byte 0xc3 in position 34: unexpected end of data
With encoding="UTF-8",nencoding="UTF-8", error is utf-8' codec can't decode byte 0xc3 in position 34: unexpected end of data With
With encoding="UTF-16", nencoding="UTF-16", error is ORA-29275: partial multibyte character
The NLS_CHARACTERSET is AL32UTF8.
Anyone who has faced this issue and resolved, please suggest.
Thanks
UTF16when the database field is UTF8 only guarantees an errorCREATE TABLEstatement andINSERTclauses that create a table with a field in that specific encoding, with test data, that people can use to fully reproduce the problem. Perhaps the problem is a hard-coded non-UTF8 encoding in ORACLE HOME?