On Nov 30, 8:31 pm, Anurag Chourasia <anurag.choura...@gmail.com>
wrote:
> On Oracle 10.2 with Character-Set set to WE8MSWIN1252,
>
> When using Django, I try to select a Oracle row which contains a field with
> value as 'Páginas', i encounter the following error "'utf8' codec can't
> decode bytes "

The NLS_LANG setting used by Django should guarantee that the data
comes back as UTF-8 regardless of the database character set.

What version of cx_Oracle are you using?
Is the column type VARCHAR2 or NVARCHAR2?
What do you get if you try the following, substituting the appropriate
values?

$ export NLS_LANG=.UTF8
$ python
>>> import cx_Oracle
>>> conn = cx_Oracle.connect('username/passw...@dsn')
>>> cursor = conn.cursor()
>>> cursor.execute("SELECT PROBLEM_COLUMN FROM TERMINOLOGY_MAP WHERE ID = 206")
>>> print repr(cursor.fetchone()[0])

Thanks,
Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to