fixed libxslt utf8 bug

git-svn-id: http://yolanda.mister-muffin.de/svn@205 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-12-17 22:52:36 +00:00
parent 47ebae3b4e
commit 12f0f05d95
2 changed files with 12 additions and 9 deletions

View file

@ -143,12 +143,10 @@ sub output_page
my $stylesheet = $xslt->parse_stylesheet($parser->parse_file("$root/xsl/xhtml.xsl"));
return $session->header(
-type=>'text/xml',
-charset=>'UTF-8'
),
$stylesheet->output_string(
$stylesheet->transform(
#TODO: this usage of libxsl omits the xsl:output definition (no ident of html) but outputs in UTF8
#TODO: later versions of XML::LibXSLT (>= 1.62) define output_as_bytes - this is what we want to use
#TODO: wait for debian packagers to update to 1.62 or later
$foo = $stylesheet->transform(
$parser->parse_string(
XMLout(
$page,
@ -158,6 +156,11 @@ sub output_page
AttrIndent => '1'
)
)
)
);
return $session->header(
-type=>'text/xml',
-charset=>'UTF-8'
),
$foo->toString;
}

View file

@ -3,7 +3,7 @@ require "functions.pl";
#create or resume session
CGI::Session->name($session_name);
$query = new CGI;
my $session = new CGI::Session;
$session = new CGI::Session;
@userinfo = get_userinfo_from_sid($session->id);