Bugzilla – Attachment 120205 Details for
Bug 28234
TestBuilder->build_sample_biblio does not deal correctly with encoding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28234: Fix encoding issues in build_sample_biblio
Bug-28234-Fix-encoding-issues-in-buildsamplebiblio.patch (text/plain), 1.33 KB, created by
Jonathan Druart
on 2021-04-27 08:47:13 UTC
(
hide
)
Description:
Bug 28234: Fix encoding issues in build_sample_biblio
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-04-27 08:47:13 UTC
Size:
1.33 KB
patch
obsolete
>From 0cce5e613f3d3bc0e5f7d24b92423fac67e511ac Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Apr 2021 10:45:53 +0200 >Subject: [PATCH] Bug 28234: Fix encoding issues in build_sample_biblio >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Found when working on bug 28230. >The tests generated a warning > no mapping found for [0x2764] at position 4 in hellâ¤ï¸ g0=ASCII_DEFAULT g1=EXTENDED_LATIN at /usr/share/perl5/MARC/Charset.pm line 308. > >The MARC::Record built by TestBuilder did not set the leader and unicode >flag >--- > t/lib/TestBuilder.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 26de949fb38..cb0f327d0a9 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -155,7 +155,14 @@ sub build_sample_biblio { > my $marcflavour = C4::Context->preference('marcflavour'); > > my $record = MARC::Record->new(); >+ >+ if ( $marcflavour eq 'MARC21' ) { >+ $record->leader(' nz a22 o 4500'); >+ C4::Charset::SetMarcUnicodeFlag( $record, 'MARC21' ); >+ } >+ > my ( $tag, $subfield ) = $marcflavour eq 'UNIMARC' ? ( 200, 'a' ) : ( 245, 'a' ); >+ > $record->append_fields( > MARC::Field->new( $tag, ' ', ' ', $subfield => $title ), > ); >-- >2.20.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 28234
:
120205
|
120212
|
120214
|
120215
|
120225
|
120226