Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
UnicodeDecodeError, to read a nvarchar2 data,and some special characters can't decode by utf8. #83
Python: Python 3.4.0 (default, Feb 16 2017, 10:21:31)
Column contenttext is nvarchar2
There are some special characters in the end,and can't decode by utf8.
I save the string to a txt file,and open it like this:
How to use cx_Oracle to read it?
Can you indicate what the database character set is? And also provide a SQL statement that will create the table and populate it with the offending row -- but only using unistr('\3042') syntax as is done in the test suite? The encoding UTF-8 is a universal character set and should be able to handle any characters. Have you tried using this syntax instead to connect?
That shouldn't be necessary but it might shed some light on why you're experiencing the issues you are experiencing.