Bugzilla – Attachment 168236 Details for
Bug 37184
Special character encoding problem when importing MARC file from the acquisitions module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37184 - Special character encoding problem when importing MARC file from the Acquisitions module
Bug-37184---Special-character-encoding-problem-whe.patch (text/plain), 1.70 KB, created by
Alexandre Noel
on 2024-06-28 12:56:28 UTC
(
hide
)
Description:
Bug 37184 - Special character encoding problem when importing MARC file from the Acquisitions module
Filename:
MIME Type:
Creator:
Alexandre Noel
Created:
2024-06-28 12:56:28 UTC
Size:
1.70 KB
patch
obsolete
>From 60f436ef926daec0db0b0a554f5b44e06cafc4b6 Mon Sep 17 00:00:00 2001 >From: Alexandre Noel <alexandre.noel@inlibro.com> >Date: Fri, 28 Jun 2024 08:38:54 -0400 >Subject: [PATCH] Bug 37184 - Special character encoding problem when importing > MARC file from the Acquisitions module >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >1. Go to Cataloging > "Stage records for import". >2. Upload the file "ExportMemento2024061010532869Marc8.mrc" or a MARC8 encoded file. >3. In the form, select the options : > - Record type: Bibliographic > - Character encoding: MARC8 > - Format: MARC >4. Click "Stage for import". >5. Find or create an open basket in the Acquisitions module. >6. Click "add to basket". >7. Select "From a staged file" and select the previous staged file. >9. Click "Select all" to check all records. >10. In the item information tab, choose the Document type. >11. Verify the titles of the records in the basket: > --> Koha replaces accents with symbols � > >12. Apply the patch. >13. Do the same from step 1 and notice there is no more encoding issues. >--- > Koha/Import/Record.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Import/Record.pm b/Koha/Import/Record.pm >index ea238e6254..a68f4b9c49 100644 >--- a/Koha/Import/Record.pm >+++ b/Koha/Import/Record.pm >@@ -56,7 +56,8 @@ sub get_marc_record { > $format = 'UNIMARCAUTH'; > } > >- my $record = MARC::Record->new_from_xml($self->marcxml, $self->encoding, $format); >+ my $encoding = $self->encoding eq 'MARC-8' ? 'UTF-8' : $self->encoding; # MARC-8 is not a valid encoding in Koha >+ my $record = MARC::Record->new_from_xml($self->marcxml, $encoding, $format); > > return $record; > } >-- >2.34.1
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 37184
:
168086
|
168236
|
170742
|
170924
|
173527