(bug #3304) fix notices trigger with diacritics in categorycodes
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Mon, 8 Jun 2009 09:10:07 +0000 (11:10 +0200)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 8 Jun 2009 22:51:31 +0000 (17:51 -0500)
This just utf8::encode the $key if needed to permit categorycodes with diacritics.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
tools/overduerules.pl

index c0d6e50..ec50ff8 100755 (executable)
@@ -43,6 +43,11 @@ sub blank_row {
     for my $rp (@rule_params) {
         for my $n (1 .. 3) {
             my $key   = "${rp}${n}-$category_code";
+            
+            if (utf8::is_utf8($key)) {
+              utf8::encode($key);
+            }
+            
             my $value = $input->param($key);
             if ($value) {
                 return 0;