Bug 13801: svc/bib - Set charset to utf-8 on printing header
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 6 Mar 2015 09:55:12 +0000 (10:55 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 25 Mar 2015 14:28:03 +0000 (11:28 -0300)
Test plan:
0/ Add unicode characters on the record biblionumber=X
1/ go on http://<staff-interface>/cgi-bin/koha/svc/bib/X
2/ Confirm you have encoding issues
3/ Apply the patch
4/ Repeat 2
5/ Confirm that all is correctly encoded

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
svc/bib

diff --git a/svc/bib b/svc/bib
index ef1e41c..43e256b 100755 (executable)
--- a/svc/bib
+++ b/svc/bib
@@ -68,7 +68,7 @@ sub fetch_bib {
     my $biblionumber = shift;
     my $record = GetMarcBiblio( $biblionumber, $query->url_param('items') );
     if  (defined $record) {
-        print $query->header(-type => 'text/xml');
+        print $query->header(-type => 'text/xml',-charset => 'utf-8',);
         print $record->as_xml_record();
     } else {
         print $query->header(-type => 'text/xml', -status => '404 Not Found');