Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by roboticus (Canon)
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.


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995099]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (17)
As of 2014-09-23 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (221 votes), past polls