@@ -, +, @@ --- C4/Output.pm | 3 ++- C4/XSLT.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) --- a/C4/Output.pm +++ a/C4/Output.pm @@ -308,8 +308,9 @@ sub output_with_http_headers { } sub output_html_with_http_headers { - binmode( STDOUT, ":encoding(utf8)" ); my ( $query, $cookie, $data, $status ) = @_; + $data =~ s/\&\;amp\; /\&\; /g && warn "DEBUG: fix double &"; + utf8::encode($data); output_with_http_headers( $query, $cookie, $data, 'html', $status ); } --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -221,7 +221,8 @@ sub XSLTParse4Display { $stylesheet->{$xslfilename} = $xslt->parse_stylesheet($style_doc); } my $results = $stylesheet->{$xslfilename}->transform($source); - my $newxmlrecord = $stylesheet->{$xslfilename}->output_string($results); + my $newxmlrecord = $stylesheet->{$xslfilename}->output_as_chars($results); + #utf8::decode($newxmlrecord); # Bug 6554 - XSLT templates have utf-8 in header return $newxmlrecord; } --