cx_Oracle: Non-ASCII characters handling with different versions

Benjamin Hell bhell at spamfence.net
Wed Nov 14 08:03:51 EST 2007


Benjamin Hell wrote:
> 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").

It's solved: Because of a local full Oracle DB installation the
"working" box had the registry key
HKEY_LOCAL_SYSTEM\SOFTWARE\ORACLE\KEY_OraBD10g_home1\NLS_LANG set to
"AMERICAN_AMERICA.WE8MSWIN1252". A similar key was missing on the
other box. I added HKEY_LOCAL_SYSTEM\SOFTWARE\ORACLE\NLS_LANG with
the same value and now it works.



More information about the Python-list mailing list