View | Details | Raw Unified | Return to bug 24827
Collapse All | Expand All

(-)a/C4/ImportBatch.pm (-1 / +1 lines)
Lines 204-210 sub EmbedItemsInImportBiblio { Link Here
204
    |, { Slice => {} }, $import_record_id );
204
    |, { Slice => {} }, $import_record_id );
205
    my @item_fields;
205
    my @item_fields;
206
    for my $import_item ( @$import_items ) {
206
    for my $import_item ( @$import_items ) {
207
        my $item_marc = MARC::Record::new_from_xml($import_item->{marcxml});
207
        my $item_marc = MARC::Record::new_from_xml($import_item->{marcxml}, 'UTF-8');
208
        push @item_fields, $item_marc->field($itemtag);
208
        push @item_fields, $item_marc->field($itemtag);
209
    }
209
    }
210
    $record->append_fields(@item_fields);
210
    $record->append_fields(@item_fields);
(-)a/Koha/BiblioUtils/Iterator.pm (-1 / +1 lines)
Lines 95-101 sub next { Link Here
95
    return if !$row;
95
    return if !$row;
96
    my $marcxml = C4::Biblio::GetXmlBiblio( $row->get_column('biblionumber') );
96
    my $marcxml = C4::Biblio::GetXmlBiblio( $row->get_column('biblionumber') );
97
    if ( $marcxml ) {
97
    if ( $marcxml ) {
98
        $marc = MARC::Record->new_from_xml( $marcxml );
98
        $marc = MARC::Record->new_from_xml( $marcxml, 'UTF-8' );
99
    }
99
    }
100
    else {
100
    else {
101
        confess "No marcxml column returned in the request.";
101
        confess "No marcxml column returned in the request.";
(-)a/t/db_dependent/Koha/Z3950Responder/GenericSession.t (-4 / +4 lines)
Lines 109-119 subtest 'test_search' => sub { Link Here
109
109
110
    is($rs->size(), 2, 'Two results returned');
110
    is($rs->size(), 2, 'Two results returned');
111
111
112
    my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw());
112
    my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw(), 'UTF-8');
113
    ok($returned1, 'Record 1 returned as MARCXML');
113
    ok($returned1, 'Record 1 returned as MARCXML');
114
    is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly');
114
    is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly');
115
115
116
    my $returned2= MARC::Record->new_from_xml($rs->record(1)->raw());
116
    my $returned2= MARC::Record->new_from_xml($rs->record(1)->raw(), 'UTF-8');
117
    ok($returned2, 'Record 2 returned as MARCXML');
117
    ok($returned2, 'Record 2 returned as MARCXML');
118
    is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
118
    is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
119
119
Lines 140-150 subtest 'test_search' => sub { Link Here
140
    my @records = $nodes[0]->getElementsByTagNameNS($marc_ns, 'record');
140
    my @records = $nodes[0]->getElementsByTagNameNS($marc_ns, 'record');
141
    is(scalar(@records), 2, 'Two results returned');
141
    is(scalar(@records), 2, 'Two results returned');
142
142
143
    $returned1 = MARC::Record->new_from_xml($records[0]->toString());
143
    $returned1 = MARC::Record->new_from_xml($records[0]->toString(), 'UTF-8');
144
    ok($returned1, 'Record 1 returned as MARCXML');
144
    ok($returned1, 'Record 1 returned as MARCXML');
145
    is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly');
145
    is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly');
146
146
147
    $returned2= MARC::Record->new_from_xml($records[1]->toString());
147
    $returned2= MARC::Record->new_from_xml($records[1]->toString(), 'UTF-8');
148
    ok($returned2, 'Record 2 returned as MARCXML');
148
    ok($returned2, 'Record 2 returned as MARCXML');
149
    is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
149
    is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
150
150
(-)a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t (-3 / +2 lines)
Lines 106-116 subtest 'test_search' => sub { Link Here
106
106
107
    is($rs->size(), 2, 'Two results returned');
107
    is($rs->size(), 2, 'Two results returned');
108
108
109
    my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw());
109
    my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw(), 'UTF-8');
110
    ok ($returned1, 'Record 1 returned as MARCXML');
110
    ok ($returned1, 'Record 1 returned as MARCXML');
111
    is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly');
111
    is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly');
112
112
113
    my $returned2= MARC::Record->new_from_xml($rs->record(1)->raw());
113
    my $returned2= MARC::Record->new_from_xml($rs->record(1)->raw(), 'UTF-8');
114
    ok ($returned2, 'Record 2 returned as MARCXML');
114
    ok ($returned2, 'Record 2 returned as MARCXML');
115
    is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
115
    is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
116
116
117
- 

Return to bug 24827