From 6730228d9456927f7c4dbaff2e9a58fe2d1653f9 Mon Sep 17 00:00:00 2001 From: kados Date: Fri, 10 Mar 2006 04:11:23 +0000 Subject: [PATCH] convert to utf-8 on import --- misc/migration_tools/bulkmarcimport.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index ac754f993c..c54f7e1ed1 100644 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -77,6 +77,9 @@ my $i=0; my ($tagfield,$tagsubfield) = &MARCfind_marc_from_kohafield($dbh,"items.itemnumber",''); # $dbh->do("lock tables biblio write, biblioitems write, items write, marc_biblio write, marc_subfield_table write, marc_blob_subfield write, marc_word write, marc_subfield_structure write, stopwords write"); while ( my $record = $batch->next() ) { + #FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding + my $uxml = $record->as_xml; + $record = MARC::Record::new_from_xml($uxml, 'UTF-8'); $i++; #now, parse the record, extract the item fields, and store them in somewhere else. -- 2.39.5