holli has asked for the wisdom of the Perl Monks concerning the following question:
and a schema class for itCREATE TABLE i18n ( Id varchar(50), Language char(2), Text text, PRIMARY KEY (Id,Language) ) ENGINE = MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci; ;
But when I use the schema and read the russian characters stored in the table the results are only question marks. I tried decoding the field using Encode but that didn't help (same result). Can anybody shed some light on this?package Superclix::Schema::I18N; use strict; use warnings; use base 'DBIx::Class'; __PACKAGE__->load_components(qw(Core UTF8Columns)); __PACKAGE__->table("i18n"); __PACKAGE__->add_columns( "Id" => { data_type => 'VARCHAR', is_nullable => 0, size => +50, accessor => 'name' }, "Language" => { data_type => 'VARCHAR', is_nullable => 0, size => +2, accessor => 'lang' }, "Text" => { data_type => 'TEXT', is_nullable => 0, accessor + => 'text' }, ); __PACKAGE__->utf8_columns(qw/Text/); 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MySQL, DBIx::Class and UTF-8
by jeffa (Bishop) on Jan 14, 2009 at 14:18 UTC | |
by Gangabass (Vicar) on Jan 14, 2009 at 15:28 UTC |