]> git.koha-community.org Git - koha.git/commit
Bug 32336: Fix encoding of MARCXML output for REST API (UNIMARC)
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 23 Nov 2022 14:43:06 +0000 (15:43 +0100)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 11 Apr 2023 11:17:09 +0000 (11:17 +0000)
commitbe4ff830909688e44780654285dd2df5d74aa0a9
treea49620db304afe4170bdd949ff6ba56c1a78f46f
parent7bdb7cd90ce8906e12038ce9ac341111765dcbf6
Bug 32336: Fix encoding of MARCXML output for REST API (UNIMARC)

Test plan:
1. Be sure to test on a UNIMARC instance
2. Enable system preferences RESTPublicAPI and RESTPublicAnonymousRequests
3. Create a biblio with some diacritics
4. Restart koha and do not interact with OPAC or the staff interface
   (this may change $MARC::File::XML::RecordFormat)
5. Query the public API to retrieve the created biblio in MARCXML. For
   instance with cURL:

   curl -H 'Accept: application/marcxml+xml' \
    http://koha.local/api/v1/public/biblios/<biblionumber>

   You should see encoding issues.
6. Apply the patch and restart Koha.
7. Repeat step 5.
   You should see no encoding issues.
8. You should also test /api/v1/biblios/<biblionumber> (this one
   requires authentication, so cURL might not be the most practical
   tool; use your favorite tool for this)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a02ba56f177fe6d05ad9ae1518d583c6a3ea8ac)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Koha/REST/V1/Biblios.pm