On 3 July 2011 12:02, Dave Cross <[email protected]> wrote:

>
> I have a MySQL db where all the tables contain UTF8 data. Actually, as far
> as I can see, the only problematic character is the £ sign.
>
> My DBIC connect looks like this:
>
> my $sch = MyData::DB->connect(
>  'dbi:mysql:database=mydata;',
>  'user', 'xxxx', { mysql_enable_utf8 => 1 }
> );
>
> Looking at
https://github.com/dbsrgits/dbix-class/blob/master/lib/DBIx/Class/Storage/DBI/mysql.pm

it doesn't look like it does a SET NAMES utf8; on initial connection and
you're not using an on_connect_do to set it so unless your mysql db conf is
set to default you might get issues?
Maybe worth using strict mode too :-\

Regards, Peter
http://perl.dragonstaff.co.uk



http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html
_______________________________________________
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/[email protected]

Reply via email to