http://qs321.pair.com?node_id=879335


in reply to CGI::Application header problem

You need to separate the headers with commas like this:

$this->header_add( -type => 'text/html', -charset => 'UTF-8');

--
જલધર

Replies are listed 'Best First'.
Re^2: CGI::Application header problem
by Anonyrnous Monk (Hermit) on Dec 27, 2010 at 23:36 UTC

    Shouldn't make any difference here (as charset is part of the Content-Type header):

    $ perl -MCGI -E "say CGI->new()->header(-type => 'text/html', -charset + =>'UTF-8')" Content-Type: text/html; charset=UTF-8

    vs. what the OP had:

    $ perl -MCGI -E "say CGI->new()->header(-type => 'text/html; charset=U +TF-8')" Content-Type: text/html; charset=UTF-8

    (CGI::App's header_add is eventually passed to CGI.pm's header method)