Bug 36335

Summary: ILS-DI GetRecords bad encoding for UNIMARC
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Web servicesAssignee: Fridolin Somers <fridolin.somers>
Status: Pushed to oldstable --- QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: normal    
Priority: P5 - low CC: david, lucas, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:
Bug Depends on: 34467    
Bug Blocks:    
Attachments: Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC
Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC
Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC

Description Fridolin Somers 2024-03-15 14:50:23 UTC
ILS-DI GetRecords generates bad encoding of MARCXML for UNIMARC, like OAI in Bug 34467
Comment 1 Fridolin Somers 2024-03-15 15:04:14 UTC
Created attachment 163251 [details] [review]
Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC

ILS-DI GetRecords generates bad encoding of MARCXML for UNIMARC, like OAI in Bug 34467

Enable ILS-DI and display a record with :
<opac url>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber>
Comment 2 David Nind 2024-03-16 22:22:30 UTC
I had a go at testing, but I'm not sure how to generate the bad encoding.

Any hints on how to create an encoding error?

I tried using the test plan I used in bug 34467 comment 8, but I didn't get an encoding error (using KTD):

1. Edited .env and change KOHA_MARC_FLAVOUR=unimarc

2. Enabled the ILS-DI system preference.

3. Modified record 1234:
   - on leader position 9, enter a blank
   - on 200$a, add a è
   - Here is what is in the leader: 01552nam  2200829   4500
   - Had to add all the required subfields
   - Edited the item for the record so that the item has the correct entries from item dropdown list options and the item type

4. Ran flush_memcached and restart_all and use a refreshed browser.

5. Used this URL: http://127.0.0.1:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=1234

6. Note that the 200$a does not have an è.

7. Applied the patch, run flush_memcached and restart_all

8. The ILS-DI response now includes an è in the 200$a
Comment 3 Frédéric Demians 2024-03-25 09:08:59 UTC
Created attachment 163767 [details] [review]
Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC

ILS-DI GetRecords generates bad encoding of MARCXML for UNIMARC, like OAI in Bug 34467

Enable ILS-DI and display a record with :
<opac url>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber>

Well-known issue, fixed
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Comment 4 Tomás Cohen Arazi (tcohen) 2024-05-10 12:23:03 UTC
Created attachment 166536 [details] [review]
Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC

ILS-DI GetRecords generates bad encoding of MARCXML for UNIMARC, like OAI in Bug 34467

Enable ILS-DI and display a record with :
<opac url>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber>

Well-known issue, fixed
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Katrin Fischer 2024-05-10 15:47:05 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-29 09:21:44 UTC
Pushed to 23.11.x for 23.11.06
Comment 7 Lucas Gass (lukeg) 2024-05-30 19:10:09 UTC
Backported to 23.05.x for upcoming 23.05.12