cx_Oracle and UTF8

Harald Armin Massa haraldarminmassa at gmail.com
Thu Feb 23 08:30:45 EST 2006


Dietz,

thank you for your answer.

> It's called NLS (national language support),
>and it is like a locale-setting in python/C. I'm too lazy to google right

Sad thing: I allready googled that and had to learn: you CAN definitely
change some parameters, that is sort order and language for error
messages with
alter session set NLSREGION  and set NLSLANGUAGE

The only part about the charset is with NLSLANG, which could be set to
German_Germany.UTF8

BUT ... NLSLANG is no per-session parameter, not setable per alter
session, it needs to get set within the environment to make SQLPLUS
recognize it.  (and, I do of course use python not sqlplus=

In another of the WWW I learned that NLSLANG has to be set on per
connection basis; not on per cursor / session basis; so my primary
suspect is cx_Oracle.Connection ... but those objects to not have a
visible method with any "encoding" in it.

Harald




More information about the Python-list mailing list