Class-DBI-utf8

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    tables with utf-8 character sets, but the Perl DB drivers don't respect
    this and still require you to pass utf-8 bytes, and return utf-8 bytes
    and hence still need special handling with Class::DBI.

    Class::DBI::utf8 will do the right thing in both cases, and I would
    suggest you tell the database to use utf-8 encoding as well as using
    Class::DBI::utf8 where possible.

CAVEATS
    This module requires perl 5.8.0 or later - if you're still using 5.6,
    and you want to use unicode, I suggest you don't. It's not nice.

    Be aware that utf-8 encoded strings will commonly have a byte length
    greater than their character length - this is because non-ascii
    characters such as e-actute will encode to two bytes, and other
    characters can be encoded to other numbers of bytes, although 2 or 3
    bytes are typical. If your database has an underlying data type of a
    limited length, for instance a CHAR(10), you may not be able to store 10
    characters in it.

    Internally, the module is futzing with the _utf8_on and _utf8_off

lib/Class/DBI/utf8.pm  view on Meta::CPAN

still require you to pass utf-8 bytes, and return utf-8 bytes and hence 
still need special handling with Class::DBI.

Class::DBI::utf8 will do the right thing in both cases, and I would
suggest you tell the database to use utf-8 encoding as well as using
Class::DBI::utf8 where possible.

=head1 CAVEATS

This module requires perl 5.8.0 or later - if you're still using 5.6, and you
want to use unicode, I suggest you don't. It's not nice.

Be aware that utf-8 encoded strings will commonly have a byte length greater
than their character length - this is because non-ascii characters such as
e-actute will encode to two bytes, and other characters can be encoded to
other numbers of bytes, although 2 or 3 bytes are typical. If your database
has an underlying data type of a limited length, for instance a CHAR(10), you
may not be able to store 10 characters in it.

Internally, the module is futzing with the _utf8_on and _utf8_off methods. If
you don't know I<why> doing that is probably a bad idea, you should read into



( run in 0.491 second using v1.01-cache-2.11-cpan-88abd93f124 )