[Koha-patches] [PATCH] [SIGNED-OFF] [3.2] Corrects a problem in batchMod.pl when accented characters are used.

Frédéric Demians f.demians at tamil.fr
Wed Sep 14 22:01:11 CEST 2011


From: Frédérick Capovilla <frederick.capovilla at sys-tech.net>

The batch modification failed with a XML parsing error if any of the
modified fields contains accented characters.

To be applied on 3.2 if this branch isn't orphean.

Signed-off-by: Frédéric Demians <f.demians at tamil.fr>
---
 tools/batchMod.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/batchMod.pl b/tools/batchMod.pl
index c400ae9..aa683ad 100755
--- a/tools/batchMod.pl
+++ b/tools/batchMod.pl
@@ -145,6 +145,7 @@ if ($op eq "action") {
 		} else {
 		    if ($something_to_modify) {
 			my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM');
+			utf8::encode($xml);
 			my $marcitem = MARC::Record::new_from_xml($xml, 'UTF-8');
 			my $localitem = TransformMarcToKoha( $dbh, $marcitem, "", 'items' );
 			my $localmarcitem=Item2Marc($itemdata);
-- 
1.7.6.1



More information about the Koha-patches mailing list