From 8770a1ede77e68309cf47439b711011b86b7d390 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 29 Oct 2020 12:18:56 +0000 Subject: [PATCH] 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! --- Koha/MetaSearcher.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/MetaSearcher.pm b/Koha/MetaSearcher.pm index 280d1b24c0..eed243735d 100644 --- a/Koha/MetaSearcher.pm +++ b/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; } -- 2.11.0