Bug 39485: Fix wide character in print-warn in opac-export
Similar change in intranet counterpart: catalogue/export. Test plan: Verify no warning anymore when using ris or isbd when record contains specific Unicode character(s). Signed-off-by: Magnus Enger <magnus@libriotech.no> I could not trigger "Wide character" for RIS in the OPAC, but for ISBD I can see it removes that warning. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
b3c93d1ea2
commit
81359cc8a6
|
|
@ -70,7 +70,7 @@ if ( $op eq "export" ) {
|
|||
( $error, $marc ) = marc2marc( $marc, 'marcstd', C4::Context->preference('marcflavour') );
|
||||
$format = "marcstd";
|
||||
}
|
||||
if ( $format =~ /utf8/ or $format =~ /marcstd/ ) {
|
||||
if ( $format ne 'marc8' ) {
|
||||
binmode STDOUT, ':encoding(UTF-8)';
|
||||
}
|
||||
print $query->header(
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ if ($error) {
|
|||
print $query->escapeHTML("$error");
|
||||
print $query->end_html();
|
||||
} else {
|
||||
binmode STDOUT, ':encoding(UTF-8)' if $format ne 'marc8';
|
||||
if ( $format eq 'marc8' ) {
|
||||
print $query->header(
|
||||
-type => 'application/marc',
|
||||
|
|
@ -181,7 +182,6 @@ if ($error) {
|
|||
-attachment => "$file_pre$file_id.$format"
|
||||
);
|
||||
} else {
|
||||
binmode STDOUT, ':encoding(UTF-8)';
|
||||
print $query->header(
|
||||
-type => 'application/octet-stream',
|
||||
-charset => 'utf-8',
|
||||
|
|
|
|||
Loading…
Reference in New Issue