Sorry, of course you're right, you can't change character set with alter session. I've used your technique of setting the environment variable for nls_lang before and been successful, but I've only been working with single connections

Martin
Hermann Schwaerzler wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hello martin

sorry for the long delay...

Martin Hall wrote:
Can you use ALTER SESSION and set nls_language?

yes I can, but without the desired effect: changing it to e.g. "GERMAN"
just affects sort order (umlauts), date-format and so on and does not
affect the encoding of the data.

what we need is the oracle equivalent of
"SET CLIENT_ENCODING TO 'encoding'" (postgresql) or
"SET NAMES 'encoding'" (SQL92 syntax)
which change the character-encoding of the data the client gets from or
sends to the server.

to achieve this, conversion to/from the encoding of the database has to
be done transparently by either the client-libraries or the server.
oracle is obviously able to do this (one can use latin1-data being
connected to an utf8-database when NLS_LANG is set to "....WE8ISO8859P1"
at startup; and vice versa) but you can not change this at runtime or
use more than one client-encoding in one application.

do you have any other suggestions?

hermann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC0jiepZ4QdpzGMxwRAjoPAJ93WDpJFM2zgcNsXqf+nHmT+669XACgjHJP
nmaZ5qUT0a12m+MaYR7UaKA=
=pL2d
-----END PGP SIGNATURE-----

Reply via email to