cx_Oracle: Non-ASCII characters handling with different versions

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Nov 14 01:24:49 EST 2007


En Tue, 13 Nov 2007 13:37:16 -0300, Benjamin Hell <bhell at spamfence.net>  
escribió:

> I have a problem with the cx_Oracle module (Oracle database access):
>
> On a computer with cx_Oracle version 4.1 (Python 2.4.3, Oracle 10g)
> I can get query results consisting of strings including non-ASCII
> characters, e.g. the code example below outputs "é 0xe9" (which is
> the correct ISO-8859-1 hex code for "é"). On a newer installation
> with cx_Oracle 4.3.3 (Python 2.5.1, connecting to the same Oracle
> 10g server) these characters are interpreted as ASCII (output "e
> 0x65"). The database encoding is the default (and it's the same DB
> in both cases anyways); I have no NLS environment environment
> variables set on either system (I'm running cygwin). The HISTORY
> file of my more recent cx_Oracle names a few changes related to
> character sets, but noone strikes me to be relevant for this case.

I've never used cx_Oracle, but Python (2.4.4 or 2.5.1) + pyodbc + the  
Oracle ODBC driver works fine for me using non-ascii characters.

-- 
Gabriel Genellina




More information about the Python-list mailing list