Lines 28-33
use strict;
Link Here
|
28 |
# standard or CPAN modules used |
28 |
# standard or CPAN modules used |
29 |
use CGI qw(:standard); |
29 |
use CGI qw(:standard); |
30 |
use DBI; |
30 |
use DBI; |
|
|
31 |
use Encode; |
31 |
|
32 |
|
32 |
# Koha modules used |
33 |
# Koha modules used |
33 |
use C4::Context; |
34 |
use C4::Context; |
Lines 75-84
my $style_doc = $parser->parse_file($xslfile);
Link Here
|
75 |
my $stylesheet = $xslt->parse_stylesheet($style_doc); |
76 |
my $stylesheet = $xslt->parse_stylesheet($style_doc); |
76 |
my $results = $stylesheet->transform($source); |
77 |
my $results = $stylesheet->transform($source); |
77 |
my $newxmlrecord = $stylesheet->output_string($results); |
78 |
my $newxmlrecord = $stylesheet->output_string($results); |
78 |
#warn $newxmlrecord; |
79 |
$newxmlrecord=Encode::decode_utf8($newxmlrecord) unless utf8::is_utf8($newxmlrecord); #decode only if not in perl internal format |
79 |
print "Content-type: text/html\n\n"; |
80 |
print $input->header(-charset => 'UTF-8'), $newxmlrecord; |
80 |
utf8::encode($newxmlrecord); |
|
|
81 |
print $newxmlrecord; |
82 |
|
81 |
|
83 |
} else { |
82 |
} else { |
84 |
|
83 |
|
85 |
- |
|
|