DBIx::Simple::UTF8Columns - Force UTF-8 flag for DBIx::Simple data


NAME

DBIx::Simple::UTF8Columns - Force UTF-8 flag for DBIx::Simple data


SYNOPSIS

    use DBIx::Simple::UTF8Columns;
    
    $db = DBIx::Simple::UTF8Columns->connect(...);
    
    # specify encoding of database' explicitly
    $db->encoding('utf8');
    # default is 'utf8', determined by global $DEFAULT_ENCODING
    $DBIx::Simple::UTF8Columns::DEFAULT_ENCODING = 'cp932';
    
    $record = $db->query(...)->hash;
    # now all of $record->{...} are UTF-8 flagged strings
    
    # you can supply UTF-8 flaged arguments to query
    $result = $db->query('INSERT INTO foo VALUES ??', "\x{263a}");
    
    # DBIx::Simple::OO is also supported
    use DBIx::Simple::OO;
    $record = $db->query(...)->object;
    # $record->field returns string with UTF-8 flag


DESCRIPTION

This module allows you to use string with UTF-8 flag (aka Unicode flag) as any arguments and results of DBIx::Simple. Also you can specify the encoding of database other than UTF-8.


MISCELLANEOUS

Field name with UTF-8 flag is not supported.

Some methods in original module are not supported, such as func, attr, bind, fetch, into.

Functionalities with SQL::Abstract are tested, but those with DBIx::XHTML_Table and Text::Table are not tested yet.


AUTHOR

ITO Nobuaki <daydream.trippers+cpan@gmail.com>


LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


SEE ALSO

the DBIx::Simple manpage, the DBIx::Class::UTF8Columns manpage, the Template::Stash::ForceUTF8 manpage