From 9b27a09c3eefdad91ae3da125ea5dc71d08ed662 Mon Sep 17 00:00:00 2001 From: Marcus Ramberg Date: Thu, 16 Sep 2004 19:40:05 +0000 Subject: [PATCH] changed to set document encoding from config->{document_encoding} defaults to utf-8 git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@189 48953598-375a-da11-a14b-00016c27c3ee --- lib/Apache/MVC.pm | 2 +- lib/CGI/Maypole.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index f7eb317..3294df0 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -42,7 +42,7 @@ sub parse_args { sub send_output { my $r = shift; - $r->{ar}->content_type( $r->{content_type} ); + $r->{ar}->content_type( $r->{content_type}."; charset=".$r->{document_encoding} ); $r->{ar}->headers_out->set( "Content-Length" => length $r->{output} ); APACHE2 || $r->{ar}->send_http_header; $r->{ar}->print( $r->{output} ); diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index e112913..b937d82 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -40,6 +40,7 @@ sub send_output { my $r = shift; print $r->{cgi}->header( -type => $r->{content_type}, + -charset => $r->{document_encoding}, -content_length => length $r->{output}, ); print $r->{output}; -- 2.39.2