Hello Jesse

Please try the following using the table 'foo' you described earlier:

mysql> set names utf8;
mysql> insert into foo (author) values('Pérez-Reverte, Arturo Кири́ллица 
ქართული  汉字 / 漢');

then try this script, notice the attributes which in this case are very 
important:

use strict;
use warnings;

use DBI;

my $attributes = {
        'mysql_enable_utf8'    => 1,
        'mysql_auto_reconnect' => 0
};
my $dsn = "DBI:mysql:database=foo";
my $username = "test";
my $password = "";

my $dbh = DBI->connect($dsn, $username, $password, $attributes) or 
die($DBI::errstr);

my $sth = $dbh->prepare("SELECT * FROM foo");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
        print "$ref->{'author'}\n";
}
$sth->finish();

What do you get there?

Regards
Matias E. Fernandez


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to