[Koha-bugs] [Bug 17754] MARCXML upload in Intranet is broken (encoding) if LDR pos. 9 is missing

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 29 20:18:58 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17754

Olivier Hubert <olivier.hubert at inlibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olivier.hubert at inlibro.com

--- Comment #18 from Olivier Hubert <olivier.hubert at inlibro.com> ---
Looking at the source code for the Perl MARC::File::XML module that is used to
read the XML file and build MARC records, the ninth character of the leader
*must* be an 'a'. Otherwise, even if we pass the correct encoding to the
MARC::Record::new_from_xml function, if the ninth character is not an 'a', the
result will not be processed as UTF-8.

I am no expert in MARCXML, but according to the schema
(https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd), each character
of the leader must be present. I think that's why the MARC::File::XML module
assumes that there will be either a space or an 'a' character at the ninth
position.

The possible solutions to this issue, as I see them, would be to:
a) reject a file with an incorrect leader.
b) modify the leader before importing to correct any existing mistake, although
I don't see how we would be able to determine the missing character(s).
c) find another module to import MARC records.
d) become part of the team working on MARC::File::XML and change the source
code :)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list