From b082aeb91476b2021514bf5bc94dfb6ff2cbef3d Mon Sep 17 00:00:00 2001 From: Stephane Delaune Date: Wed, 22 Feb 2017 12:25:33 +0100 Subject: [PATCH] Bug 18152 : fix unimarc label in SetMarcUnicodeFlag The standard UNIMARC requires than the 9th character (starting from 0) in labels must be blank (while it may be 'a' in marc21) the problem is that C4::Charset::SetMarcUnicodeFlag (called in particular when we import a record) always add 'a' char in the 9th label'pos whereas it should do it just for MARC21 and NORMARC (not for UNIMARC) : C4::Charset::SetMarcUnicodeFlag add 'a' char in the 9th label character for MARC21 and NORMARC (it's normal), but just before doing this it call "$marc_record->encoding('UTF-8')" which is a MARC::Record function which, when called with 'UTF-8' parameter, do only one thing : add 'a' char in the 9th label character This patch only removes this incorrect function call, so, when we import a bib record in UNIMARC : it no longer adds erroneous character (this does not change anything for MARC21 and NORMARC because SetMarcUnicodeFlag explicitly adds 'a' char in the 9th label for them) Signed-off-by: Alex Buckley Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit bf551a07222a7b9beffd7ca6cba38c675aa3ab28) Signed-off-by: Katrin Fischer (cherry picked from commit a7c25ccdd52cc3ae467651cadd3b4b89e5f69ff8) Signed-off-by: Julian Maurice --- C4/Charset.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/C4/Charset.pm b/C4/Charset.pm index cd7a61fa25..e46d1748ac 100644 --- a/C4/Charset.pm +++ b/C4/Charset.pm @@ -326,7 +326,6 @@ sub SetMarcUnicodeFlag { my $marc_record = shift; my $marc_flavour = shift; # || C4::Context->preference("marcflavour"); - $marc_record->encoding('UTF-8'); if ($marc_flavour eq 'MARC21' || $marc_flavour eq 'NORMARC') { my $leader = $marc_record->leader(); substr($leader, 9, 1) = 'a'; -- 2.39.5