Hi Stas,
Good advice !!
I've found that a user have a similar problem using PHP, and that the only
avalaible value for NSL_LANG is this case was
'American_America.EE8ISO8859P2'
I've tried this value and it works, but with bad accents.
"ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
l'enlèvement ne pourra pas se faire"
becomes
"ou entrer l'heure d'enl?vement passée ou ? venir. Entrer étoile si
l'enl?vement ne pourra pas se faire"

BUT with this strange value
'American_America.WE8ISO8859P1'
it seems to work fine.
"ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
l'enlèvement ne pourra pas se faire"
stays
"ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
l'enlèvement ne pourra pas se faire"

Maybe, Oracle doesn't like France ;-)

Thank you a lot Stas.

So if you have the same problem you can try this value....
Now my script is :
============================================================================
===
use DBI;
use DBD::Oracle;
use CGI;
use Env::C;

#Env::C::setenv('NLS_LANG', 'french_france.WE8ISO8859P1',1);
# Doesnt'work with mod_perl
# ===> ERROR ? ORA-00604: error occurred at recursive SQL level 1 ORA-01756:
quoted string not properly terminated (DBD ERROR: OCISessionBegin)

#Env::C::setenv('NLS_LANG', 'American_America.EE8ISO8859P2',1);
#Works but, not really fine

Env::C::setenv('NLS_LANG', 'American_America.WE8ISO8859P1',1);
#Seems to work !!!

Env::C::setenv('ORACLE_HOME', '/opt/oracle/product/10g/OraDB10g',1);

$ENTETE_HTML=0;

$q = new CGI;                        # create new CGI object

&EnteteHTML();
 $dsn='DBI:Oracle:TOPDEV5';
 $user='user';
 $passwd='password';
 $dbh = DBI->connect($dsn, $user,$passwd);
print "dbh=$dbh<br>";
print "ERROR ? $DBI::errstr<br>";
$SQLOrder="select MESSAGE_TEXT from AUDIO";
 my $sel1 = $dbh->prepare($SQLOrder);
 $sel1->execute()|| die "Error : $DBI::errstr";
 my @cols;
 while (@cols = $sel1->fetchrow_array) {
  my $name=$cols[0];
print "$name<br>";
}
&EndHTML();
#===========================================================================
===
sub EnteteHTML
#===========================================================================
===
 {
 return if ($ENTETE_HTML);
 print $q->header('text/html');
  print "<HTML>\n";
  print "<BODY TEXT=#000000 LINK=#FFFFFF ALINK=#FFFFFF VLINK=#FFFFFF
onLoad=document.next_DIALOG_OUTPUT_ID.XX_INPUT_XX.focus();>";
 $ENTETE_HTML++;
 }
#===========================================================================
===
sub EndHTML
#===========================================================================
===
 {
 return unless ($ENTETE_HTML);
 print "</BODY></HTML>\n";
 }






----- Original Message ----- 
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Jean-Paul COGNET" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, November 03, 2004 1:29 AM
Subject: Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle


> Jean-Paul COGNET wrote:
> > I have tried using Env::C (from CPAN), without using a startup.pl
script.
> > And it is the same behaviour.
> > Any idea ?
> > Thank you very much.
>
> I've never used Oracle, so I can't really tell what the problem is. If you
> could figure out how to reproduce it with something else I'd be more
helpful.
>
> Any luck with using google.com to find the solution? Feeding that error
> message to google shows quite a lot of hits. I'm not sure how relevant
> they are to our case.
>
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to