From b331c0669281a887173473106710ef6b3051defa Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= <frederick.capovilla@sys-tech.net>
Date: Wed, 14 Sep 2011 15:20:33 -0400
Subject: [PATCH] Corrects a problem in batchMod.pl when accented characters are used.

The batch modification failed with a XML parsing error if any of the
modified fields contains accented characters.
---
 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.5.6.5