Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS X

by roboticus (Chancellor)
on Sep 22, 2012 at 12:26 UTC ( #995099=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995099]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-05-28 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?