[Koha-bugs] [Bug 19436] Add SRU support for authorities

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 20 14:20:22 CET 2018


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

--- Comment #14 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Matthias Meusburger from comment #13)

> Both parts (in handle_one_result and Z3950SearchAuth) were made to fix an
> encoding problem, but I may have not made the best of fixes.

Please specify what the problem was. What settings/encodings ?

> The problem comes from the fact that I tried to use the encoding string from
> the Z3950 profiles for the MARC::Record->new_from_xml calls, just like it is
> used for MarcToUTF8Record.
> However, if MarcToUTF8Record recognizes 'UTF-8' as well as 'utf8',
> MARC::Record->new_from_xml doesn't.

The second encoding parameter of new_from_xml is the desired result encoding.
Since we want UTF-8, there is no need to pass utf8. The third parameter is the
source format (UNIMARC, USMARC, MARC21), not the encoding. The xml itself
should contain an encoding too.

The optimization in handle_one_result eliminated the need for calling
new_from_xml and MarcToUTF8Record in a row, doing more or less the same.

> So I'm perfectly fine with your revert of _handle_one_result, and making the
> calls in Z3950SearchAuth in line with _handle_one_result (with the use of
> the 'UTF-8' string in plain text in the code).
> However, that would be assuming that all SRU servers are serving UTF-8 (are
> they?).
> In that case, we should disable the "Encoding" dropdown list in SRU servers
> configuration.

No, that is a misunderstanding. We are converting to UTF-8 as an internal
format for Koha, not as a source encoding.

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


More information about the Koha-bugs mailing list