Bug 34514 - opac-showmarc.pl does not handle UNIMARC well
Summary: opac-showmarc.pl does not handle UNIMARC well
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-10 18:49 UTC by Fridolin Somers
Modified: 2023-12-16 22:05 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 34514: opac-showmarc.pl does not handle UNIMARC well (1.71 KB, patch)
2023-08-10 18:57 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 34514: opac-showmarc.pl use marc flavour (1.70 KB, patch)
2023-08-10 19:01 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2023-08-10 18:49:33 UTC
opac-showmarc.pl calls $record->as_xml.
We see in other places using XSL transformation that MARC flavor should be sent.

Looks like encoding fails when a "real" UTF-8 character is used. For example É

Bug 29333 fixed catalogue/showmarc.pl.
Comment 1 Fridolin Somers 2023-08-10 18:57:42 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2023-08-10 19:01:10 UTC
Created attachment 154351 [details] [review]
Bug 34514: opac-showmarc.pl use marc flavour

opac-showmarc.pl calls $record->as_xml.
We see in other places using XSL transformation that MARC flavor should be sent.

Looks like encoding fails when a "real" UTF-8 character is used. For example uppercase é

Bug 29333 fixed catalogue/showmarc.pl.

Test plan :
1) Use UNIMARC database
2) Edit a biblio record to add uppercase é in title 200$a
3) Go to OPAC MARC vue of this record
4) Download record as MARCXML
=> Check encoding of title is OK
5) Click on 'view plain'
=> Check encoding of title is OK
Comment 3 Katrin Fischer 2023-08-17 08:48:42 UTC
We tested in in a Sandbox and it worked without applying the Patches. We didnt see any encoding errors.
Comment 4 Katrin Fischer 2023-08-17 08:50:18 UTC
(In reply to Katrin Fischer from comment #3)
> We tested in in a Sandbox and it worked without applying the Patches. We
> didnt see any encoding errors.

This was tested by Pascal Uphaus (just wrong bugzilla login :) )
Comment 5 Fridolin Somers 2023-08-17 20:47:54 UTC
We use Ubuntu Focal, maybe Perl MARC::Record is a bit different
Comment 6 Fridolin Somers 2023-08-17 20:52:00 UTC
Bug 32336 did this same change
Comment 7 Fridolin Somers 2023-10-02 22:03:54 UTC
Ah needs work
Should use metadata->schema
Comment 8 Fridolin Somers 2023-10-10 06:37:04 UTC
(In reply to Fridolin Somers from comment #7)
> Ah needs work
> Should use metadata->schema

Ah forget about that for now since catalogue/showmarc.pl does not use it.
Code in opac/opac-showmarc.pl should look the same.

Can be tested.
Comment 9 David Nind 2023-12-16 22:05:43 UTC
I tested using Ubuntu Focal and UNIMARC (using KTD, change KOHA_IMAGE=master-focal and KOHA_MARC_FLAVOUR=unimarc).

There was no change in the display, or the downloaded MARCXML file: title used was L'Anniversaire de é É Marcellin (Record no. 4441) and shows in the downloaded file as "L'Anniversaire de é É Marcellin".

Is this still an issue, or how can we replicate it some otehr way?

Changed status in the meantime.