I've a question about the best way to interpose in checking the arguments passed from DBIC via DBI to DBD::Oracle::execute().

From DBD::Oracle docs
http://search.cpan.org/~pythian/DBD-Oracle-1.22/Oracle.pm#DBD::Oracle_and_Unicode
there's a strange situation.

Data fetched is always returned as UTF-8 marked Perl variables.
When sending data using placeholders, however, if you use Perl internal byte encoded format variables containing wide characters you can get broken (double encoded) results on re-retrieving.

Ideally, I'd like to catch the check all the arguments that end up passed to execute() and either throw an exception on non UTF-8 marked vars with wide characters or call decode('iso-8859-1', $var) on each one first. This is so I can replicate the behaviour of the BBC's internal caching db library.

I had a look at lib/DBIx/Class/Storage/DBI.pm and DBI/Oracle.pm but couldn't see any easy way to do this.
Any suggestions on the best way to do this?

Thanks, Peter
http://perl.dragonstaff.co.uk




_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to