Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 13296
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: john [...] rohanland.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.16
Fixed in: (no value)



Subject: DBD-Oracle 1.16 Oracle data corruption
Download (untitled) / with headers
text/plain 1.8k
#!/usr/local/bin/perl -w # # Not sure how to describe bug; run the enclosed code # compare print out on line pack "C*" I know pack C* is weird to do # but it clearly shows that Oracle data is corrupted # # If i run unpack "A*" pack a* etc on the Oracle data the problem # goes away # # this script gives an idea of what I am seeing # it happens on solaris 10 Intel and Solaris 8 on Sparc # when I rollback to DBD-Oracle 1.14 the behavior goes away # on all systems # # I am running against Oracle 9 & 10 databases and using Oracle 9 software # on Sparc 8 and Oracle 10g on Solaris Intel 10 for the DBD build # # connections are to remote databases using SQL*Net # NLS_LANG AMERICAN_AMERICA.UTF8 # # I get the error on these versions of perl -v 5.005_03, 5.8.7 # use strict; use warnings; use DBI; # any database 9i,10g my $dbh=DBI->connect("dbi:Oracle:",'scott/tiger@test',) or die "error 1\n"; my ($s1,$s2)=getData(); $dbh->disconnect; processString($s1); processString($s2); sub processString { my $string=shift; print "$string\n"; # data LOOKs OKAY # $string = pack ("a*",$string); # this will clean the data # $string = pack ("A*",$string); # this will clean the data # $string = unpack ("a*",$string); # this will clean the data # $string = unpack ("A*",$string); # this will clean the data $string = pack "C*", $string; # this will give an error # Argument "\x{4d}\x{51} ..." isn't a numeric for Oracle # Argument "MQC" isn't a numeric for clean data } sub getData { my ($s1,$s2,$sth); $sth=$dbh->prepare(" SELECT 'BUNCE' from dual "); # hard code result $sth->execute; $s1=$sth->fetchrow(); $sth->finish; $s2='BUNCE'; # hard code result print "EQUAL\n" if ( $s1 eq $s2); # return ($s1,$s2); } # # If there is any other information I can provide please let me know #
Download (untitled) / with headers
text/plain 534b
Read this carefully: http://search.cpan.org/~timb/DBD-Oracle/Oracle.pm#Unicode Especially the part that says: ---snip--- Perl and Unicode Perl began implementing Unicode with version 5.6, but the implementaion did not mature until version 5.8 and later. If you plan to use Unicode you are strongly urged to use perl 5.8.2 or later and to carefully read the perl documention on Unicode: perldoc perluniintro # in perl 5.8 or later perldoc perlunicode And then read it again. ---snip--- Then upgrade your very old perl.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.