Re: ORA-12704: character set mismatch problem with DBD::Oracle
- From: hjp@xxxxxxxxx (Peter J. Holzer)
- Date: Thu, 27 Oct 2005 15:16:55 +0200
On 2005-01-25 14:43:54 -0500, Jim Lynch wrote:
> It's not being set that way. It is a variable that was loaded by a
> select from another table. It's a string as far as perl is concerned
> but in this case the DBD routines are screwing it up, I believe. My
> mistake for not showing compilable code, what I meant to say was if I
> set the variable $serial to the character string "abc" it works, but if
> it is set to the character string "0800690C0A" it fails.
I have a similar problem. However the difference between "it works" and
"it doesn't work" seems to be if the parameter is a perl UTF-8 string:
% export PERL_UNICODE=SAL
% /usr/local/bin/perl =dumpsql 'select * from login where logname=?' hjp
DBD::Oracle::st execute failed: ORA-12704: character set mismatch (DBD ERROR: error possibly near <*> indicator at char 37 in 'select * from login where logname=:p1<*>') [for Statement "select * from login where logname=?" with ParamValues: :p1="hjp"] at /home/hjp/bin/dumpsql line 68.
ID LOGNAME PERSON MD5
DBD::Oracle::st fetchrow_array failed: ERROR no statement executing (perhaps you need to call execute first) [for Statement "select * from login where logname=?" with ParamValues: :p1="hjp"] at /home/hjp/bin/dumpsql line 88.
% export PERL_UNICODE=SL
% /usr/local/bin/perl =dumpsql 'select * from login where logname=?' hjp
ID LOGNAME PERSON MD5
5731 hjp 5611
bernon:~/tmp 15:01 186%
("dumpsql" is a small perl script which does basically only connect,
prepare, execute, fetchrow_array. "A" in PERL_UNICODE means command line
arguments are UTF-8).
Note that the string "hjp" itself doesn't contain any non-ascii characters.
This happens with
perl, v5.8.6 built for i686-linux
DBI 1.48
DBD::Oracle 1.16
linked against Oracle 8.1.7, I believe.
The database is also Oracle 8.1.7. It seems to work if the database is
Oracle 9.2.
I cannot reproduce the problem with
perl, v5.8.3 built for i386-linux-thread-multi
DBI 1.46
DBD::Oracle 1.15
on the same machine.
hp
--
_ | Peter J. Holzer | In our modern say,learn,know in a day
|_|_) | Sysadmin WSR | world, perhaps being an expert is an
| | | hjp@xxxxxxxxx | outdated concept.
__/ | http://www.hjp.at/ | -- Catharine Drozdowski on dbi-users.
Attachment:pgp3FfOFnjaRG.pgp
Description: PGP signature
- Prev by Date: Re: Disabling Apache::DBI
- Next by Date: DBD::Oracle and CLOBs
- Previous by thread: Installation DBD
- Next by thread: DBD::Oracle and CLOBs
- Index(es):
Relevant Pages
|