Bug 10402: (QA followup) amend unit tests
[koha.git] / opac / opac-export.pl
index 002c88e..64c758a 100755 (executable)
@@ -91,8 +91,16 @@ if ($error){
     print $query->end_html();
 }
 else {
-    print $query->header(
-      -type => 'application/octet-stream',
-      -attachment=>"bib-$biblionumber.$format");
+    if ($format eq 'marc8'){
+        print $query->header(
+            -type => 'application/marc',
+            -charset=>'ISO-2022',
+            -attachment=>"bib-$biblionumber.$format");
+    }else{
+        print $query->header(
+            -type => 'application/octet-stream',
+            -charset=>'utf-8',
+            -attachment=>"bib-$biblionumber.$format");
+    }
     print $marc;
 }