0

We are getting trouble when reading the data like ("â¦", "dóñez", etc) from a data file and storing into oracle DB, these are special characters and they must read and write into database as they are.
These following areas where we are getting the problems:
1) when we use split() function, theses characters are converted into like ['\xc3\xa2\xc2\xa6', 'd\xc3\xb3\xc3\xb1ez']
2) when I call database cursor execute for insert by using same data, the data inserted as "d����ez".

But when I directly used insert/update statement from SQL developer tool, the data correctly insterted/updated as we expected, but with python only we are getting the problems. What is the fix needed here, pelase advice

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by kuchi
1

'd\xc3\xb3\xc3\xb1ez

What kind of encoding you are using, utf8, it would seem:

>>> print 'd\xc3\xb3\xc3\xb1ez'.decode('utf8')
dóñez
>>> 
0

When I use the above decode function, I got the following result which is not accepted. Please more clues

dóñez

0

Probably I didn't asked properly, here is my question straightly
I need to read a text of non-ascii (ex:- dóñez) and store them into database. But my app is storing as d??ez in database, how can I save as the data is?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.