Search Postgresql Archives

Re: DBI-Link, Oracle, database encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 25, 2006 at 03:47:20PM +0200, Albe Laurenz wrote:
> 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.

Try it again :)
http://pgfoundry.org/projects/dbi-link/

If you are using DBI-Link, please sign up for its mailing list on
pgfoundry.
http://lists.pgfoundry.org/mailman/listinfo/dbi-link-general

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

Is there some way to set this in the connection string for DBI?

> 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.

DBI-Link 2.0beta1 provides some infrastructure for setting environment
variables.  Any suggestions would be welcome.

> 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.

I'm the author.  I hope I have a little ;)

Cheers,
David.
-- 
David Fetter <david@xxxxxxxxxx> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux