Browse Source

Bug 18051: Set UTF8 Flag for record searches/imports from rancor

The advanced cataloging editor uses Koha::MetaSearcher to find and import records
from Z3950.

The records are correctly converted to UTF8, however, we need to set the flag in the
record to ensure they are parsed correctly later

To test:
 1 - Add OHIOLINK as a z39 source as described in earlier comments
 2 - Browse to Cataloging->Advanced editor
 3 - Click Search->Advanced
 4 - Select OHIOLINK
 5 - Search for author 'capek karel'
 6 - Note records look bad
 7 - Apply patch
 8 - Restart all the things
 9 - Repeat
10 - Success!

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Nick Clemens 4 years ago
committed by Jonathan Druart
parent
commit
4d92e3d284
  1. 3
      Koha/MetaSearcher.pm

3
Koha/MetaSearcher.pm

@ -21,7 +21,7 @@ use Modern::Perl;
use base 'Class::Accessor';
use C4::Charset qw( MarcToUTF8Record );
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
use C4::Search qw(); # Purely for new_record_from_zebra
use DBIx::Class::ResultClass::HashRefInflator;
use IO::Select;
@ -298,6 +298,7 @@ sub _import_record {
my ( $marcrecord ) = MarcToUTF8Record( $raw, $marcflavour, $encoding ); #ignores charset return values
SetUTF8Flag($marcrecord);
return $marcrecord;
}

Loading…
Cancel
Save