Bug 16578: Same fix for the staff interface
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 May 2016 17:09:27 +0000 (18:09 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 16:49:43 +0000 (16:49 +0000)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as first patch
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

catalogue/export.pl

index 39cac7c..f82250d 100755 (executable)
@@ -69,6 +69,9 @@ if ($op eq "export") {
                 ($error, $marc) = marc2marc($marc, 'marcstd', C4::Context->preference('marcflavour'));
                 $format = "marcstd";
             }
+            if ( $format =~ /utf8/ or $format =~ /marcstd/ ) {
+                binmode STDOUT, ':encoding(UTF-8)';
+            }
             print $query->header(
                 -type => 'application/octet-stream',
                 -attachment=>"bib-$biblionumber.$format");