[open-ils-commits] r359 - conifer/trunk/tools/migration-scripts (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 19 21:06:37 EDT 2009
Author: dbs
Date: 2009-04-19 21:06:36 -0400 (Sun, 19 Apr 2009)
New Revision: 359
Modified:
conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl
Log:
One more bad subfield, and replace with obvious character for later investigation
Modified: conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl
===================================================================
--- conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl 2009-04-19 21:20:57 UTC (rev 358)
+++ conifer/trunk/tools/migration-scripts/fix_bad_marcxml.pl 2009-04-20 01:06:36 UTC (rev 359)
@@ -35,10 +35,13 @@
# This will at least enable MARC::File::XML to process it:
if ($_ =~ m#<subfield code=""">#o) {
print STDERR "Bad subfield code \" at line $lineno of file $file\n";
- $_ =~ s{<subfield code=""">}{<subfield code="a">}o;
+ $_ =~ s{<subfield code=""">}{<subfield code="Z">}o;
} elsif ($_ =~ m#<subfield code="<">#o) {
print STDERR "Bad subfield code < at line $lineno of file $file\n";
- $_ =~ s{<subfield code="<">}{<subfield code="a">}o;
+ $_ =~ s{<subfield code="<">}{<subfield code="Z">}o;
+ } elsif ($_ =~ m#<subfield code="&">#o) {
+ print STDERR "Bad subfield code & at line $lineno of file $file\n";
+ $_ =~ s{<subfield code="&">}{<subfield code="Z">}o;
}
$lastline = $_;
More information about the open-ils-commits
mailing list