From b7a5df084d5a7ff5044af6262e31887512c9a9d8 Mon Sep 17 00:00:00 2001 From: Stephen Wills Date: Fri, 28 May 2021 17:30:07 -0700 Subject: [PATCH] Docs: Update migrating_your_data.adoc Signed-off-by: Stephen Wills Signed-off-by: Jane Sandberg --- .../admin_initial_setup/pages/migrating_your_data.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc b/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc index 0c89278b61..aafda90407 100644 --- a/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc +++ b/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc @@ -69,6 +69,19 @@ for record in reader: writer.write(pymarc.record_to_xml(record) + "\n") ------------------------------------------------------------------------------ +Note: pymarc does not fail gracefully when it encounters encoding issues - often +either because LDR09 is lying, or because non-UTF8 / non-MARC8 chars (like iso-8859-1) +have been added by other less strict tools and the above script will fail. + +Another way to convert the .mrc to xml is with yaz-marcdump using the following: +[source] +------------------------------------------------------------------------------ +yaz-marcdump -i marc -o marcxml -f utf8 -t utf8 -l 9=97 records_in.mrc > records_out.xml +------------------------------------------------------------------------------ + +The resulting file will have its XML formatted into human readable format and need to be +massaged such that each record container is on a single line. + Once you have a MARCXML file with one record per line, you can load the records into your Evergreen system via a staging table in your database. -- 2.11.0