[Koha-cvs] koha/misc/migration_tools bulkmarcimport.pl [rel_2_2]

Joshua Ferraro jmf at kados.org
Fri Mar 10 05:11:23 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/03/10 04:11:23

Modified files:
	misc/migration_tools: bulkmarcimport.pl 

Log message:
	convert to utf-8 on import

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/misc/migration_tools/bulkmarcimport.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text

Patches:
Index: koha/misc/migration_tools/bulkmarcimport.pl
diff -u koha/misc/migration_tools/bulkmarcimport.pl:1.1.2.1 koha/misc/migration_tools/bulkmarcimport.pl:1.1.2.2
--- koha/misc/migration_tools/bulkmarcimport.pl:1.1.2.1	Mon Aug  1 14:49:20 2005
+++ koha/misc/migration_tools/bulkmarcimport.pl	Fri Mar 10 04:11:23 2006
@@ -77,6 +77,9 @@
 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.
 





More information about the Koha-cvs mailing list