[Koha-bugs] [Bug 33994] New: OAI : Characters with accents are wrongly encoded

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 13 11:38:55 CEST 2023


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

            Bug ID: 33994
           Summary: OAI : Characters with accents are wrongly encoded
 Change sponsored?: ---
           Product: Koha
           Version: 22.11
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Web services
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: christophe.torin at univ-rennes2.fr
        QA Contact: testopia at bugs.koha-community.org

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

-- 
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