Bugzilla – Attachment 63041 Details for
Bug 18152
UNIMARC bib records imported with invalid 'a' char in label pos.9
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18152: Leader 9 for UNIMARC records must be blank
Bug-18152-Leader-9-for-UNIMARC-records-must-be-bla.patch (text/plain), 1.22 KB, created by
Jonathan Druart
on 2017-05-03 18:31:17 UTC
(
hide
)
Description:
Bug 18152: Leader 9 for UNIMARC records must be blank
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-05-03 18:31:17 UTC
Size:
1.22 KB
patch
obsolete
>From 245ac8d71618c116e5d2b7d5e507135f3b54bc0e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 May 2017 15:30:27 -0300 >Subject: [PATCH] Bug 18152: Leader 9 for UNIMARC records must be blank > >--- > C4/Charset.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/C4/Charset.pm b/C4/Charset.pm >index 906321f..93b6caa 100644 >--- a/C4/Charset.pm >+++ b/C4/Charset.pm >@@ -324,6 +324,7 @@ sub SetMarcUnicodeFlag { > my $marc_record = shift; > my $marc_flavour = shift; # || C4::Context->preference("marcflavour"); > >+ $marc_record->encoding('UTF-8'); > if ($marc_flavour eq 'MARC21' || $marc_flavour eq 'NORMARC') { > my $leader = $marc_record->leader(); > substr($leader, 9, 1) = 'a'; >@@ -352,6 +353,11 @@ sub SetMarcUnicodeFlag { > $marc_record->insert_grouped_field( > MARC::Field->new( 100, '', '', "a" => $string ) ); > } >+ >+ my $leader = $marc_record->leader(); >+ substr($leader, 9, 1) = ' '; >+ $marc_record->leader($leader); >+ > $debug && warn "encodage: ", substr( $marc_record->subfield(100, 'a'), $encodingposition, 3 ); > } else { > warn "Unrecognized marcflavour: $marc_flavour"; >-- >2.9.3
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 18152
:
60547
|
60548
|
60549
|
60550
|
60551
|
62246
|
63008
|
63040
|
63041
|
63102
|
63103