DBIx::Simple::UTF8Columns - Force UTF-8 flag for DBIx::Simple data
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
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.
Field name with UTF-8 flag is not supported.
Some methods in original module are not supported, such as func, attr, bind, fetch, into.
func
attr
bind
fetch
into
Functionalities with SQL::Abstract are tested, but those with DBIx::XHTML_Table and Text::Table are not tested yet.
ITO Nobuaki <daydream.trippers+cpan@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DBIx::Simple, DBIx::Class::UTF8Columns, Template::Stash::ForceUTF8
To install DBIx::Simple::UTF8Columns, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Simple::UTF8Columns
CPAN shell
perl -MCPAN -e shell install DBIx::Simple::UTF8Columns
For more information on module installation, please visit the detailed CPAN module installation guide.