1 # UTF8DBI.pm re-implementation by Pavel Kudinov http://search.cpan.org/~kudinov/
2 # originally from: http://dysphoria.net/code/perl-utf8/
4 package UTF8DBI ; use base DBI ;
5 package UTF8DBI::db; use base DBI::db;
6 package UTF8DBI::st; use base DBI::st;
10 if (ref $_ eq 'ARRAY'){ _utf8_() foreach @$_ }
11 elsif (ref $_ eq 'HASH' ){ _utf8_() foreach values %$_ }
12 else { Encode::_utf8_on($_) };
16 sub fetch { return _utf8_ for shift->SUPER::fetch (@_) };
17 sub fetchrow_arrayref { return _utf8_ for shift->SUPER::fetchrow_arrayref(@_) };
18 sub fetchrow_hashref { return _utf8_ for shift->SUPER::fetchrow_hashref (@_) };
19 sub fetchall_arrayref { return _utf8_ for shift->SUPER::fetchall_arrayref(@_) };
20 sub fetchall_hashref { return _utf8_ for shift->SUPER::fetchall_hashref (@_) };
21 sub fetchcol_arrayref { return _utf8_ for shift->SUPER::fetchcol_arrayref(@_) };
23 sub fetchrow_array { @{shift-> fetchrow_arrayref(@_)} };