I am happy to rebuild the perl-based web framework to support UTF8. I took the following steps
for the main script:
use open IO => ":utf8",":std";
use utf8;
for DBI adapter:
$self->{dbh}->{'mysql_enable_utf8'} = 1;'
and in my request syntax for COST-based POST and GET:
foreach (@val) { $_ = decode("UTF-8",$_); }
This, as far as I can tell, works fine on my local Ubuntu with Perl 5.10.1, but on a web server that runs 5.10, decoding POST or GET will ruin the text.
I have to admit, all of UTF8 really confuses me. I need to read templates
Get data from mySQL
POST and GET process to insert into mySQL
write templates
Is there something that I forget here? What can cause erratic behavior? Does every module that I use mainly a script need use utf8 specifically, or is it enough if the main script does this?
Thanks for any tips,
Thomas
source share