On Tue, 2004-12-07 at 10:04 +0000, Dan Osborne wrote:
> Tim Bunce wrote:
> > On Mon, Dec 06, 2004 at 05:02:07PM -0000, Dan Osborne wrote:
> >> I'm getting the above error on a new machine set up with perl 5.8.0
> >> DBD-Oracle 1.16 and DBI 1.46.
> >>
> >> This triggers the error ...
> >>
> >> $cursor=$dbh->prepare(<<__SQL__);
> >> select data_type,
> >> data_length,
> >> data_precision,
> >> data_scale
> >> from user_tab_columns
> >> where
> >> column_name = ?
> >> and
> >> table_name = ?
> >> __SQL__
> >>
> >> my $res=$cursor->execute(@fld);
> >>
> >> Oddly, if I substitute literals for @fld it works OK ...
> >>
> >> my $res=$cursor->execute('gen_user','gen_users');
> >>
> >> I can access the same database (Oracle 8.1.6) without error from
> >> machines with the same version of perl but earlier DBDs.
> >>
> >> My NLS_CHARACTERSET is US7ASCII (from $dbh->ora_nls_parameters()).
> >>
> >> Any guidance as to how to correct this error would be much
> >> appreciated.
> >
> > I'd guess that the contents of @fld are marked (by perl) as being
> > UTF-8.
> >
> > You can use the new data_string_diff() and data_string_desc()
> > utility functions in DBI 1.46 to find out more.
> >
> > Don't forget to (re)read the Unicode section of the DBD::Oracle docs.
> >
> > Tim.
>
> Hmm, your guess is spot on! What is the best way to switch UTF-8 off? no
> utf8 at the top of the program didn't do it, utf8::downgrade on each
> placeholder did work but would mean quite a few changes to my source code.
>
> TIA
>
If your data is UTF-8, why loose it. I would think it simpler to think
about migrating (up grading) your database character set to AL32UTF8.
Lincoln