Go to file
Fridolin Somers 82e36e20bb Bug 23542: Fix SRU import encoding
When importing records from a SRU server, the diacritics have bad encoding.
I reproduce with BNF server so it may be a UNIMARC issue.

Tests show that difference between Z39.50 server and SRU is that leader contains 'a' at postion 9.
Looking at MARC::Record->encoding() shows that encoding depends on leader even for UNIMARC.
So this patch adds a call to MARC::Record->encoding('UTF-8') in case of a SRU server in C4::Breeding.

Same use exists in Koha::MetadataRecord::Authority::get_from_breeding().

In case of import via Z3950, MarcToUTF8Record() is called,
 which calls SetMarcUnicodeFlag(),
 which calls MARC::Record->encoding('UTF-8')

Test plan :
1) Use a UNIMARC database
2) Configure a connexion to a UNIMARC SRU, for example BNF,
   see https://doc.biblibre.com/koha/autour_de_koha/serveurs_z3950_sru#serveur_de_la_bnf
3) Go to cataloguing module
4) Click on 'New from Z39.50/SRU'
5) Choose only the SRU target
6) Search for ISBN 2266072889
7) Confirm you see good encoding : diacritic on 'a' of title 'Strate-a-gemmes'
8) Click on 'Marc preview'
9) Confirm you see good encoding
10) Click import
11) Confirm you see good encoding
12) Check also Authorities import via SRU
13) Check also SRU imports on a MARC21 database

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Removed change to new_from_xml call. We should respect syntax.
But the added MARC::Record encoding does the tric! Which is implicit
for Z3950 targets where MarcToUTF8Record does the same.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 19d9ba176d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 79855e9f5b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 7494cea82f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-09-20 16:51:10 +02:00
C4 Bug 23542: Fix SRU import encoding 2020-09-20 16:51:10 +02:00
Koha Bug 24379: Fix failing tests (19.05: fix warnings) 2020-09-19 01:46:54 +02:00
OpenILS
…
acqui Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
admin Bug 25873: Ignore malformed data for Elasticsearch integer fields 2020-09-20 13:11:19 +02:00
api/v1 Bug 25944: Schema fix for illrequests route 2020-09-18 17:26:19 +02:00
authorities Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
basket Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
catalogue Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
cataloguing Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
circ Bug 25726: make holds to pull ignore holds where found is not null and itemnumber is null 2020-09-18 19:36:11 +02:00
clubs Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
course_reserves Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
debian Bug 17084: Automatic debian/control updates 2020-09-15 04:59:43 +02:00
docs Update teams for 20.05 cycle 2019-11-28 18:56:59 +00:00
errors Bug 23329: Move error page to its own subroutine 2019-11-22 10:35:05 +00:00
etc Bug 26253: (bug 22857 follow-up) Remove duplicated mana_config in etc/koha-conf.xml 2020-09-18 17:43:11 +02:00
ill Bug 21460: (follow-up) Fix bugs found in QA 2019-04-25 10:46:56 +00:00
installer Bug 24379: DBRev 19.05.14.002 2020-09-19 01:27:11 +02:00
koha-tmpl Revert "Bug 25762: Typo in linkitem.tt" 2020-09-20 14:23:51 +02:00
labels Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
members Bug 23634: (follow-up) Prevent updates on POST 2020-08-25 05:49:41 +02:00
misc Update release notes for 19.05.14 release 2020-08-25 15:04:04 +02:00
offline_circ Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
opac Bug 25982: OPAC shelves RSS link output is xml 2020-09-20 12:24:12 +02:00
patron_lists Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
patroncards Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
plugins Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
reports Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
reserve Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
reviews Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
rotating_collections Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
serials Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
services
…
skel
…
suggestion Bug 22868: Move suggestions_manage subperm out of acquisition perm 2020-02-14 20:19:59 +00:00
svc Bug 24663: [19.05.x] Force authentication in svc/records/preview (?) 2020-08-24 18:04:47 +02:00
t Bug 26162: [19.11] Fix DT info label 2020-09-20 14:59:04 +02:00
tags Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
tmp/modified_authorities
…
tools Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
virtualshelves Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
xt Bug 21576: Keep compatibility with QA script 2018-10-26 17:09:52 +00:00
.editorconfig
…
.gitignore Bug 20427: Convert OPAC LESS to SCSS 2018-08-09 15:17:07 +00:00
.htaccess
…
.mailmap
…
.scss-lint.yml Bug 21237: Clean up staff client SCSS 2018-08-24 16:23:25 +00:00
INSTALL
…
Koha.pm Bug 24379: DBRev 19.05.14.002 2020-09-19 01:27:11 +02:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 21626: (QA follow-up) Embed teams.yaml for debian packages 2019-05-17 14:46:10 +00:00
README
…
README.md
…
README.robots
…
about.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
changelanguage.pl Bug 21299: (QA follow-up) Rename module and subroutine 2018-11-07 21:52:17 +00:00
fix-perl-path.PL
…
gulpfile.js Bug 21751: Replace fixFloat with HC-sticky to fix Chrome display 2019-02-04 14:13:35 +00:00
help.pl Bug 19817: Use the language from the interface if valid 2018-09-06 17:32:28 +00:00
koha_perl_deps.pl
…
kohaversion.pl
…
mainpage.pl Bug 24663: [19.05.x] Remove authnotrequired if set to 0 2020-08-24 18:04:43 +02:00
package.json Bug 19474: Convert staff client CSS to SCSS 2018-08-09 15:12:20 +00:00
rewrite-config.PL Bug 14302: Remove GRS1 specific code 2018-08-31 11:24:20 +00:00
yarn.lock Bug 19474: Convert staff client CSS to SCSS 2018-08-09 15:12:20 +00:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo