Bug 33994 - OAI : Characters with accents are wrongly encoded
Summary: OAI : Characters with accents are wrongly encoded
Status: RESOLVED DUPLICATE of bug 34467
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: 22.11
Hardware: All Linux
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-13 09:38 UTC by Christophe TORIN
Modified: 2023-10-10 19:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe TORIN 2023-06-13 09:38:55 UTC
Hello,

We just upgraded from Koha 20.11 to 22.11, and we are facing an issue for the OAI-PMH service :

Test case (Koha Version 22.11.04) :

- Select a document having a title containing accents (eg : "Préparation à l'oral d'espagnol")
- Everything is correctly displayed in Koha
- Query the OAIPMH service for this record (cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=oai_dc&identifier=<oai_prefix>:<biblionumber>)
- The fields with accents are badly displayed. (For this example I get "Prp̌aration  l̉'oral d'espagnol"

======

My assumption is that the metadata gets encoded twice, and the accents are then badly encoded in the result.

I spotted exactly the line in the code where the data is badly encoded, but I can't find why.

The major difference between 20.11 et 22.11 is in Koha/OAI/Server/Repository.pm, line 181 : 
Before, we used the C4::Biblio::GetMarcBiblio function (now deleted), and now it's $biblio->metadata->record

For info, $biblio->metadata->metadata is correctly encoded

Thanks
Comment 1 Fridolin Somers 2023-10-10 19:06:18 UTC
This is fixed by Bug 34467

*** This bug has been marked as a duplicate of bug 34467 ***