From 15088c67d6c1960e98c216321985d667ccf26706 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 16 Mar 2018 09:52:19 +0100 Subject: [PATCH] Bug 19436: (QA follow-up) Revert change in _handle_one_result See Bugzilla comment 7. This change does not belong here and is dubious on its own. Needs further attention on another report. Signed-off-by: Marcel de Rooy Amended: In consultation with the author the same change is applied to the corresponding lines in Z3950SearchAuth. Signed-off-by: Nick Clemens --- C4/Breeding.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 7f8b189985..37f450d39c 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -315,9 +315,11 @@ sub _handle_one_result { my $raw= $zoomrec->raw(); my $marcrecord; if( $servhref->{servertype} eq 'sru' ) { - $raw= MARC::Record->new_from_xml( $raw, $servhref->{encoding}, $servhref->{syntax} ); + $marcrecord= MARC::Record->new_from_xml( $raw, 'UTF-8', + $servhref->{syntax} ); + } else { + ($marcrecord) = MarcToUTF8Record($raw, C4::Context->preference('marcflavour'), $servhref->{encoding} // "iso-5426" ); #ignores charset return values } - ($marcrecord) = MarcToUTF8Record($raw, C4::Context->preference('marcflavour'), $servhref->{encoding} // "iso-5426" ); #ignores charset return values SetUTF8Flag($marcrecord); my $error; ( $marcrecord, $error ) = _do_xslt_proc($marcrecord, $servhref, $xslh); @@ -621,9 +623,10 @@ sub Z3950SearchAuth { my ($charset_result, $charset_errors); if( $servers[$k]->{servertype} eq 'sru' ) { - $marcdata = MARC::Record->new_from_xml( $marcdata, $encoding[$k], $servers[$k]->{syntax} ); + $marcrecord = MARC::Record->new_from_xml( $marcdata, 'UTF-8', $servers[$k]->{syntax} ); + } else { + ( $marcrecord, $charset_result, $charset_errors ) = MarcToUTF8Record( $marcdata, $marc_type, $encoding[$k] ); } - ($marcrecord, $charset_result, $charset_errors)= MarcToUTF8Record($marcdata, $marc_type, $encoding[$k]); my $heading; my $heading_authtype_code; $heading_authtype_code = GuessAuthTypeCode($marcrecord); -- 2.39.5