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


DBIx-Simple-UTF8Columns documentation  | view source Contained in the DBIx-Simple-UTF8Columns distribution.

Index


NAME

Top

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

SYNOPSIS

Top

    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

Top

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

Top

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

Top

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

LICENSE

Top

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

SEE ALSO

Top

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


DBIx-Simple-UTF8Columns documentation  | view source Contained in the DBIx-Simple-UTF8Columns distribution.