|
|
| Don't ask to ask, just ask | |
| PerlMonks |
I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS Xby Cody Fendant (Monk) |
| on Sep 22, 2012 at 05:53 UTC ( #995048=perlquestion: print w/ replies, xml ) | Need Help?? |
|
Cody Fendant has asked for the
wisdom of the Perl Monks concerning the following question:
Ingredients:
MySQL table:
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?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||