From 1da2c6ce42747ee9f2ac12b96e7483588d17e284 Mon Sep 17 00:00:00 2001 From: dbs Date: Fri, 17 Sep 2010 19:39:37 +0000 Subject: [PATCH] Revert attempt to prevent encoding corruption that was causing encoding corruption LDR/09 was never showing up as 'a' where it was being tested, and adding the 'a' was preventing a reconversion to UTF8. It somewhat looks like the UTF8 MARCXML input gets converted to MARC8 as part of MARC::Batch's magic, then gets converted back to UTF8 by MARC::File::XML::as_xml_record(). Seems like this would mean potential performance / encoding problems but it works, which is better than what my meddlesome tests were doing. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17776 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm index c794032c9..3572e8136 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm @@ -281,15 +281,6 @@ sub process_spool { $logger->info("processing record $count"); try { - # Avoid an over-eager MARC::File::XML that may try to convert - # our record from MARC8 to UTF8 and break because the record - # is obviously already UTF8 - my $ldr = $r->leader(); - if (($marctype eq 'XML') && (substr($ldr, 9, 1) ne 'a')) { - $logger->warn("MARCXML record LDR/09 was not 'a'; record leader may be corrupt"); - substr($ldr,9,1,'a'); - $r->leader($ldr); - } (my $xml = $r->as_xml_record()) =~ s/\n//sog; $xml =~ s/^<\?xml.+\?\s*>//go; $xml =~ s/>\s+