[Israel.pm] Re: Upcomming meeting: Hebrew and Perl

Mikhael Goikhman migo at homemail.com
Wed Jun 16 04:29:47 PDT 2004


On 16 Jun 2004 12:10:29 +0300, Yehuda Berlinger wrote:
> 
> Make sure you tell the difference between:
> 
> print $cgi->header();
> print <<EOF;
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
> </head>
> <body>
> $hebrew_text
> </body>
> </html>
> EOF
> 
> and
> 
> print $cgi->header(-Content_Type => "text/html; charset=windows-1255");
> print <<EOF;
> <html>
> <body>
> $hebrew_text
> </body>
> </html>
> EOF
> 
> The first one didn't work for me using Internet Explorer. The second 
> one did.

I don't think this has anything to do with "Hebrew and Perl". The issue
is your web server is configured to set some default charset, like
iso8859-1 or utf-8, if not otherwise specified in cgi. And many browsers
prefer the charset specified in HTTP headers to the one in HTML if there
are both. Whether this is a correct browser behaviour is left aside.

The solution is either to set HTTP headers in cgi or to reconfigure the
web server not to set any default charset in Content-Type header.

Regards,
Mikhael.

-- 
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'



More information about the Perl mailing list