in reply to some questions on cgi.pm

You can set the character encoding with CGI's start_html method. For example, to use the Hebrew ISO-8859 codepage,

my $q = CGI->new; print $q->header; print $q->start_html( -encoding => 'iso-8859-8' );

You could also use UTF-8 which is probably more widely supported these days. The direction of the text display is up to the browser to handle properly and can't be controlled from your script.

Replies are listed 'Best First'.
Re^2: some questions on cgi.pm
by dorward (Curate) on Jul 27, 2005 at 15:44 UTC
    That just sets the encoding for the XML prolog - it doesn't influence the HTTP Content-type, and under HTTP rules the Content-type trumps anything else for determining the character encoding. (See ikegami's comment for setting the HTTP header)