Bugzilla – Attachment 34281 Details for
Bug 13296
error when using z3950 with UNIMARC authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13296 - error when using z3950 with UNIMARC authorities
Bug-13296---error-when-using-z3950-with-UNIMARC-au.patch (text/plain), 3.20 KB, created by
Jonathan Druart
on 2014-12-10 15:16:43 UTC
(
hide
)
Description:
Bug 13296 - error when using z3950 with UNIMARC authorities
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-12-10 15:16:43 UTC
Size:
3.20 KB
patch
obsolete
>From 99932cd473c5387f0149c85608066d5a99b84775 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 19 Nov 2014 11:56:54 +0100 >Subject: [PATCH] Bug 13296 - error when using z3950 with UNIMARC authorities > >When using a z3950 connexion with UNIMARC authorities, you get an error : >Unsupported UNIMARC character encoding [ ] for XML output for UNIMARCAUTH; 100$a -> 20141119 > >I've seen thant Bug 2060 when adds authorities import adds a special behavior for UNIMARC : marc flavor must be UNIMARCAUTH instead of just UNIMARC. > >This patch adds the same behavior when using z3950 connexion and import. > >Test plan : > - Use a UNIMARC install > - Define a z3950 connexion for UNIMARC authorities > - Go to Authorities module > - Click on "New from Z39.50" > - Perform a search >=> Without patch : you get the error >=> With patch : you get results > - Import one result >=> You get the authoritie creation form with all datas >You may check same plan with MARC21 install > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > C4/Breeding.pm | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index cf32bf4..d1dbbcb 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -431,6 +431,9 @@ sub ImportBreedingAuth { > my $searchbreeding = $dbh->prepare("select import_record_id from import_auths where control_number=? and authorized_heading=?"); > > # $encoding = C4::Context->preference("marcflavour") unless $encoding; >+ my $marc_type = C4::Context->preference('marcflavour'); >+ $marc_type .= 'AUTH' if ($marc_type eq 'UNIMARC'); >+ > # fields used for import results > my $imported=0; > my $alreadyindb = 0; >@@ -440,7 +443,7 @@ sub ImportBreedingAuth { > for (my $i=0;$i<=$#marcarray;$i++) { > my ($marcrecord, $charset_result, $charset_errors); > ($marcrecord, $charset_result, $charset_errors) = >- MarcToUTF8Record($marcarray[$i]."\x1D", C4::Context->preference("marcflavour"), $encoding); >+ MarcToUTF8Record($marcarray[$i]."\x1D", $marc_type, $encoding); > > # Normalize the record so it doesn't have separated diacritics > SetUTF8Flag($marcrecord); >@@ -542,6 +545,9 @@ sub Z3950SearchAuth { > my $query; > my $nterms=0; > >+ my $marc_type = C4::Context->preference('marcflavour'); >+ $marc_type .= 'AUTH' if ($marc_type eq 'UNIMARC'); >+ > if ($nameany) { > $query .= " \@attr 1=1002 \"$nameany\" "; #Any name (this includes personal, corporate, meeting/conference authors, and author names in subject headings) > #This attribute is supported by both the Library of Congress and Libraries Australia 08/05/2013 >@@ -655,7 +661,7 @@ sub Z3950SearchAuth { > $marcdata = $rec->raw(); > > my ($charset_result, $charset_errors); >- ($marcrecord, $charset_result, $charset_errors)= MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]); >+ ($marcrecord, $charset_result, $charset_errors)= MarcToUTF8Record($marcdata, $marc_type, $encoding[$k]); > > my $heading; > my $heading_authtype_code; >-- >2.1.0
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 13296
:
33675
|
34281
|
34282
|
34283
|
34531
|
34532