Hello,

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) {
        Encode::_utf8_on($fdat{$k});
}

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
                </Files>
        </Directory>

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)
embp...@thefreecat.org                       /\\
Independant Consultant and Developer        _\_V

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-h...@perl.apache.org

Reply via email to