perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Gormley <>
Subject Re: Problem with french accents using mod perl
Date Thu, 08 Sep 2005 10:48:20 GMT
On Thu, 2005-09-08 at 02:41 -0400, Sebastien Pinsonnault wrote:

> I have a website which has french accents (i.e. é) and I noticed that
> when a page uses mod perl in a cgi, the french accents are all messed
> up in my browser.
> But if I take the same script and redirect the output to a html file
> (ex: ./login.cgi &> ../test.html), the accents display fine...

Most likely your web pages are setting a different character set to the
one you are using on your computer. So, for instance, your default
character set on your computer may be utf8, but your web pages claim to
be in ISO-8559-1, so the unicode characters that you type in are being
interpreted by the browser incorrectly.

Have a look in the perldocs at :
 - perluniintro
 - perlunicode
 - utf8
 - perlrun (look at command line switch -C)
 - Encode

Also, if you are pulling unicode data out of a MySQL database, you need
to let perl know that the data is unicode, as it doesn't detect it


Clinton Gormley - For travellers, By travellers

View raw message