X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FImportBatch.pm;h=5f466134e2976090a0f3f5c4092a51fc44671aab;hb=6807d7e3383e015ac787bcd327bfd8b512ea2a78;hp=648d96e734c95248807e00ccf5840909bfe782b0;hpb=e883a0f065d166db1e42fee3b67369a056569ba6;p=koha.git diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 648d96e734..5f466134e2 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -382,6 +382,10 @@ sub BatchStageMarcRecords { if (scalar($marc_record->fields()) == 0) { push @invalid_records, $marc_blob; } else { + + # Normalize the record so it doesn't have separated diacritics + SetUTF8Flag($marc_record); + $num_valid++; if ($record_type eq 'biblio') { $import_record_id = AddBiblioToBatch($batch_id, $rec_num, $marc_record, $encoding, int(rand(99999)), 0); @@ -617,6 +621,7 @@ sub BatchCommitRecords { # remove item fields so that they don't get # added again if record is reverted + # FIXME: GetXmlBiblio output should not contain item info any more! So the next foreach should not be needed. Does not hurt either; may remove old 952s that should not have been there anymore. my $old_marc = MARC::Record->new_from_xml(StripNonXmlChars($oldxml), 'UTF-8', $rowref->{'encoding'}, $marc_type); foreach my $item_field ($old_marc->field($item_tag)) { $old_marc->delete_field($item_field);