Bugzilla – Attachment 151510 Details for
Bug 33404
Authorities imported from Z39.50 in encodings other than UTF-8 are corrupted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33404: (bug 19436 follow-up) Save the original encoded record
Bug-33404-bug-19436-follow-up-Save-the-original-en.patch (text/plain), 1.94 KB, created by
Nick Clemens
on 2023-05-22 11:39:51 UTC
(
hide
)
Description:
Bug 33404: (bug 19436 follow-up) Save the original encoded record
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2023-05-22 11:39:51 UTC
Size:
1.94 KB
patch
obsolete
>From 2d273c396b376db75ee1d4c24d0f475f8608a18b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 22 May 2023 10:51:18 +0000 >Subject: [PATCH] Bug 33404: (bug 19436 follow-up) Save the original encoded > record > >This patch restores previous behavior of storing the record as received >from the source with the original encoding. We store the encoding in the DB >as well, but save the record converted to UTF8 - this means that when we try >to display and convert to UTF8 again, we mangle the record > >While providing a test plan, it requires a MARC8 Authority source, and I cannot locate >an open one. This change can be verified by reading the code. > >There are no unit tests for Z3950SearchAuth, but it does too much and requires many mocks, >this is a small fix to a reversion and should be able to move forward. > >To test: >1 - Search a Z39 authority server that has MARC8 (or non utf8) records >2 - Find a record with diacritics in the record >3 - Import it >4 - Note diacritics are mangled >5 - Apply patch, restart_all >6 - Perform a new Z3950 search (to ensure record is not already in reservoir) >7 - Find a record with diacritics >8 - Import it >9 - Note diacritics correctly encoded >--- > C4/Breeding.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index efc9029f48..95c5c0402e 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -596,7 +596,7 @@ sub Z3950SearchAuth { > > $heading = GetAuthorizedHeading({ record => $marcrecord }); > >- my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading ); >+ my $breedingid = ImportBreedingAuth( $marcdata, $serverhost[$k], $encoding[$k], $heading ); > my %row_data; > $row_data{server} = $servers[$k]->{'servername'}; > $row_data{breedingid} = $breedingid; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33404
:
151510
|
151624
|
151636
|
151641
|
151644
|
151672
|
151673
|
151674
|
151868
|
151869
|
151870
|
153014
|
153015
|
153016