[Koha-bugs] [Bug 33404] Authorities imported from Z39.50 in encodings other than UTF-8 are corrupted

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 22 13:39:51 CEST 2023


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

--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 151510
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151510&action=edit
Bug 33404: (bug 19436 follow-up) Save the original encoded record

This patch restores previous behavior of storing the record as received
from the source with the original encoding. We store the encoding in the DB
as well, but save the record converted to UTF8 - this means that when we try
to display and convert to UTF8 again, we mangle the record

While providing a test plan, it requires a MARC8 Authority source, and I cannot
locate
an open one. This change can be verified by reading the code.

There are no unit tests for Z3950SearchAuth, but it does too much and requires
many mocks,
this is a small fix to a reversion and should be able to move forward.

To test:
1 - Search a Z39 authority server that has MARC8 (or non utf8) records
2 - Find a record with diacritics in the record
3 - Import it
4 - Note diacritics are mangled
5 - Apply patch, restart_all
6 - Perform a new Z3950 search (to ensure record is not already in reservoir)
7 - Find a record with diacritics
8 - Import it
9 - Note diacritics correctly encoded

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


More information about the Koha-bugs mailing list