Bug 28234: TestBuilder->build_sample_biblio should set UTF-8 encoding for record
This patch makes the build_sample_biblio method, correctly set the UTF-8 flag for the MARC::Record object. Tests are added. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/TestBuilder.t FAIL: Tests fail! An unexpected encoding warning shows 3. Apply this patch 4. Repeat 2 => SUCCESS: No warning! Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
e5f43c6868
commit
8fce3401e7
1 changed files with 2 additions and 0 deletions
|
@ -155,6 +155,8 @@ sub build_sample_biblio {
|
|||
my $marcflavour = C4::Context->preference('marcflavour');
|
||||
|
||||
my $record = MARC::Record->new();
|
||||
$record->encoding( 'UTF-8' );
|
||||
|
||||
my ( $tag, $subfield ) = $marcflavour eq 'UNIMARC' ? ( 200, 'a' ) : ( 245, 'a' );
|
||||
$record->append_fields(
|
||||
MARC::Field->new( $tag, ' ', ' ', $subfield => $title ),
|
||||
|
|
Loading…
Reference in a new issue