Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 scrutinizing the Monastery: (7)
As of 2017-01-19 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (167 votes). Check out past polls.