[Koha-bugs] [Bug 19436] Add SRU support for authorities
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 16 09:53:09 CET 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19436
--- Comment #7 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Sub _handle_one_result is changed here, but not used in the scope of this
report.
if( $servhref->{servertype} eq 'sru' ) {
- $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
+ $raw= MARC::Record->new_from_xml( $raw, $servhref->{encoding},
$servhref->{syntax} );
}
+ ($marcrecord) = MarcToUTF8Record($raw,
C4::Context->preference('marcflavour'), $servhref->{encoding} // "iso-5426" );
#ignores charset return values
OLD:
if( $servhref->{servertype} eq 'sru' ) {
$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
}
NEW:
if( $servhref->{servertype} eq 'sru' ) {
$raw= MARC::Record->new_from_xml( $raw, $servhref->{encoding},
$servhref->{syntax} );
}
($marcrecord) = MarcToUTF8Record($raw,
C4::Context->preference('marcflavour'), $servhref->{encoding} // "iso-5426" );
#ignores charset return values
You might be solving another bug here (??), but it should be moved to another
report. I plan to revert this change in a follow-up.
Please explain the change too. The old situation looks better to me.
Note also that the encoding variable may contain 'utf8' instead of 'UTF-8';
might be wrong for other encodings as well.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list