Re: DBI-Link, Oracle, database encoding

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Hannes Dorbath *EXTERN*" <light(at)theendofthetunnel(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: DBI-Link, Oracle, database encoding
Date: 2006-10-25 13:47:20
Message-ID: 52EF20B2E3209443BC37736D00C3C1380B20BB0A@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Willy-Bas Loos 2006-10-25 13:49:54 password cookie
Previous Message Alejandro D. Burne 2006-10-25 12:35:05 Re: identificar usuario con registro en una tabla