Re: DBI-Link, Oracle, database encoding - Mailing list pgsql-general

From Albe Laurenz
Subject Re: DBI-Link, Oracle, database encoding
Date
Msg-id 52EF20B2E3209443BC37736D00C3C1380B20BB0A@EXADV1.host.magwien.gv.at
Whole thread Raw
In response to DBI-Link, Oracle, database encoding  (Hannes Dorbath <light@theendofthetunnel.de>)
Responses Re: DBI-Link, Oracle, database encoding
List pgsql-general
Hannes Dorbath wrote:
> After some trouble we managed to get up DBI-Link between PG 8.1.5 and
> Oracle 9i.
>
> Oracle is on LATIN1 (I think) and the PG database runs on
> UTF8. We have
> some encoding problems with it.
>
> We tried setting NLS_LANG='american_america.AL32UTF8' for
> Oracle, which
> works for SqlPlus, but not DBD::Oracle (as it seems to me).
>
> Has anyone experience with such a setup? My knowledge on
> Oracle is limited.

I know about Oracle, but have not yet managed to setup DBI-Link.

NLS_LANG need to be set in the environment of the process using
the Oracle client.

In the case of a stored procedure (as in DBI-Link) this is the
PostgreSQL server. So make sure that the postmaster process has
NLS_LANG set appropriately in its environment.

The second problem is the correct value for NLS_LANG.
The codepage in NLS_LANG must be the codepage used by the
application that accesses Oracle. It should NOT be set to the
database codepage.

I don't know what codepage the PL/Perl program that is
DBI-Link uses, but my guess is that it is the database codepage.

So if your database is UTF8, use AL32UTF8.
If your database is LATIN1, use WE8ISO8859P1.
If your database is LATIN9, use WE8ISO8859P15.

Maybe somebody else with more insight into DBI-Link
than me can provide better information.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: DBI-Link, Oracle, database encoding
Next
From: "Willy-Bas Loos"
Date:
Subject: password cookie