Subject: | DBI->connect sets LC_NUMERIC to C |
Date: | Wed, 05 Jun 2013 13:48:38 +0200 |
To: | bug-DBI [...] rt.cpan.org |
From: | Jan Carlsson <janne [...] val.se> |
Versions:
DBI: 1.609
DBD::Oracle 1.52
perl: 5.10.1
platform: RHEL6
Oracle: 11.2.0.3.0
After DBI->connect to an Oracle database, the LC_NUMERIC locale has been
set to C.
Script which reproduces the error:
----------------------------------------------
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
use POSIX;
use locale;
setlocale(LC_ALL,'sv_SE.iso88591');
print "locale=",setlocale(LC_ALL),"\n";
my $sid = $ENV{'ORACLE_SID'};
my($uid,$pwd) = split('/',$ENV{'UIDPWD'});
my $dbh = DBI->connect("dbi:Oracle:$sid",$uid,$pwd,{ RaiseError => 1,
AutoCommit => 0 });
print "locale=",setlocale(LC_ALL),"\n";
----------------------------------------------
When the script is run, the output is:
locale=sv_SE.iso88591
locale=LC_CTYPE=sv_SE.iso88591;LC_NUMERIC=C;LC_TIME=sv_SE.iso88591;LC_COLLATE=sv_SE.iso88591;LC_MONETARY=sv_SE.iso88591;LC_MESSAGES=sv_SE.iso88591;LC_PAPER=sv_SE.iso88591;LC_NAME=sv_SE.iso88591;LC_ADDRESS=sv_SE.iso88591;LC_TELEPHONE=sv_SE.iso88591;LC_MEASUREMENT=sv_SE.iso88591;LC_IDENTIFICATION=sv_SE.iso88591
Regards, Jan Carlsson