From e19bef3c45721c1905154966b3e2e358f751d910 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 10 Aug 2023 09:32:43 -1000 Subject: [PATCH] Bug 34515: Fix encoding of MARCXML output for REST API (UNIMARC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like fixed for REST API, OAI-PMH output should be fixed to use metadata schema when building MARCXML. Test plan : 1) Use UNIMARC database 2) Enable OAI-PMH webservice 3) Edit a biblio record to add uppercase éin title 200$a 4) Go to OAI record : /cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=xxx => Check encoding of title is OK --- Koha/OAI/Server/Repository.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index 273497412f..fd14255a13 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/Koha/OAI/Server/Repository.pm @@ -206,7 +206,8 @@ sub get_biblio_marcxml { ); $record_processor->process($record); } - return ( $record ? $record->as_xml_record() : undef, $decoding_error ); + my $schema = $biblio->metadata->schema // C4::Context->preference("marcflavour"); + return ( $record ? $record->as_xml_record($schema) : undef, $decoding_error ); } -- 2.41.0