http://www.perlmonks.org?node_id=995099


in reply to Re^2: I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS X
in thread I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS X

Cody Fendant:

I just looked at the DBD::mysql documentation, and there's a setting mysql_enable_utf8 that defaults to off. I've not used DBD::mysql, but based on the docs, it looks like you can just add the setting in the connect statement like this:

$dbh= DBI->connect("DBI:mysql:test;mysql_enable_utf8=1", "root", "");

++ for the OP: clear, detailed and didn't seem to miss any pertinent information.

...roboticus

When your only tool is a hammer, all problems look like your thumb.