Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by ddick (5726) on 2009.12.22 17:19 (#71436) Journal

    It's difficult for me to tell what's happening, but suggestions follow:

    • decide that UTF-8 is going to be your encoding
    • read up on the my $decoded = Encode::decode('UTF-8', $encoded) and my $encoded = Encode::encode('UTF-8', $decoded) functions
    • encode strings just before they leave your application (just before print, DBI, whatever)
    • decode strings as soon as possible (just after read, my $encoded = $cgi->param($name), $sth->fetchrow, whatever)
    • make sure your MySQL databases are created with "CREATE DATABASE `$database_name` CHARACTER SET utf8";
    • make sure all of your elements contain 'accept-charset="UTF-8"'
    • write a test script to prove it all works
    • Dammit, i meant to say

      • make sure all of your <form> elements contain 'accept-charset="UTF-8"'
    • Apparently that didn't cause all the havoc. The havoc was caused by a breakage in the API.

      What bugs me isn't even that, it's that it's so incredibly complex that it would take me a month to read the manual alone. That I have no way of writing really fast CRUDs, which is the core of my web apps.

      I still appreciate the comments, and I'll definitely take them under advisement. Thanks!