|Perl Monk, Perl Meditation|
I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS Xby Cody Fendant (Pilgrim)
|on Sep 22, 2012 at 05:53 UTC||Need Help??|
Cody Fendant has asked for the
wisdom of the Perl Monks concerning the following question:
Insert one row with some smart quote characters in it
Command-line MySQL to check the characters got inserted correctly (having connected with --default-character-set=utf8 flag):
Minimal perl script to get that row:
I have my OS X Terminal set to UTF-8 encoding. I have a UTF-8 aware version of bash (I can create files with those quotes in the name and successfully ls and display them.
But when I run the script above from the terminal, it outputs this:
And when I run it via BBEdit's very handy Run command for Unix scripts, I get this:
Any assistance you can give me will be very gratefully received. Something is obviously going wrong between the database and the output hitting the screen, but everything in the chain is supposed to be UTF-8 aware.
What should I try?