Bug 18152 : fix unimarc label in SetMarcUnicodeFlag
authorStephane Delaune <stephane.delaune@biblibre.com>
Wed, 22 Feb 2017 11:25:33 +0000 (12:25 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 8 May 2017 12:36:57 +0000 (08:36 -0400)
commitbf551a07222a7b9beffd7ca6cba38c675aa3ab28
treee9979c1c55d83b1f95f700e137f6753612b8c7ca
parent9bf8142ee77dbacceca0cb17ed5f56ec07b3771c
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 <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Charset.pm