perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Boggio <>
Subject Encoding problem
Date Wed, 21 Apr 2010 15:20:46 GMT

I have problems with the encoding of posted form data. I try to do everything
in UTF-8 (code, DB, html...).

I have a form on a page where the data IS utf-8 (that's what I think) but
it does not have the UTF-8 bit set, wonder why.

Firefox detects the page encoding as Unicode (UTF-8). The page has this header :
<meta http-equiv="content-type" content="text/html; charset=utf-8">

But if I "print OUT $fdat{myfield}" it gets re-encoded in UTF-8 (ie: I get two
chars like Äç for every accented letter)

The following code makes the page work but I don't understand why I have to
do the work manually :

foreach my $k(keys %fdat) {

My apache2 conf is like this :

         <Directory /var/www/sites/dynatouraine>
                 Options Indexes FollowSymLinks MultiViews
                 AllowOverride None
                 Order allow,deny
                 allow from all
                 EMBPERL_APPNAME         DynaTouraine
                 EMBPERL_OBJECT_BASE     base.epl
                 EMBPERL_ESCMODE         0
                 <Files *.html>
                         SetHandler      perl-script
                         PerlHandler     Embperl::Object
                         Options         ExecCGI

Thanks for your help.

PS: Embperl 2.2.0-3.1 on Debian/Lenny 5.0.4 with apache 2.2.9-10+lenny6

Jean-Christophe Boggio                       -o)                       /\\
Independant Consultant and Developer        _\_V

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message