From 46df2bb6c53f7b5da6c4041032a07b762cd3c579 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 10 Oct 2011 11:59:54 +0200 Subject: [PATCH] 6996 Encoding problem in opac-showmarc Content-Type: text/plain; charset="utf-8" Need to decode the output coming back from xslt processor in opac-showmarc. --- opac/opac-showmarc.pl | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index 4475512..c052c28 100755 --- a/opac/opac-showmarc.pl +++ b/opac/opac-showmarc.pl @@ -29,6 +29,7 @@ use warnings; # standard or CPAN modules used use CGI; +use Encode; # Koha modules used use C4::Context; @@ -78,8 +79,8 @@ if ($view eq 'card' || $view eq 'html') { my $style_doc = $parser->parse_file($xslfile); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); - my $newxmlrecord = $stylesheet->output_string($results); - print $input->header(), $newxmlrecord; + my $newxmlrecord = Encode::decode_utf8($stylesheet->output_string($results)); + print $input->header(-charset => 'UTF-8'), $newxmlrecord; exit; } else { $record =GetMarcBiblio($biblionumber) unless $record; -- 1.6.0.6