Bug 6869 Batch item modification fails whit accented characters
authorFrédéric Demians <f.demians@tamil.fr>
Wed, 14 Sep 2011 19:44:49 +0000 (21:44 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 26 Sep 2011 19:27:01 +0000 (08:27 +1300)
Corrects a problem in batchMod.pl when accented characters are used.

When modifying multiple items in batchMod.pl, the batch modification
fails if accented characters are used in any of the fields of the
modification form.

This is a port of Frédérick Capovilla patch from 3.2 to 3.4 version

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
tools/batchMod.pl

index 9d4431b..04cfc87 100755 (executable)
@@ -135,6 +135,7 @@ if ($op eq "action") {
        my (  $itemtagfield,   $itemtagsubfield) = &GetMarcFromKohaField("items.itemnumber", "");
        if ($values_to_modify){
            my $xml = TransformHtmlToXml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, 'ITEM');
+        utf8::encode($xml);
            $marcitem = MARC::Record::new_from_xml($xml, 'UTF-8');
         }
         if ($values_to_blank){