From 478f3a7fcc99ddc54c01adeb065a527a782cd81a Mon Sep 17 00:00:00 2001
From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Date: Tue, 2 Apr 2013 15:17:31 +0200
Subject: [PATCH] Bug 9951: Followup for tools/viewlog.pl

Adds utf8 cgi parameter decoding.

Test plan: Enter diacritics in librarian field. Submit. Check.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

This is ok in this case, as we are not doing any post/get of binary
data, but I note from the man page

This makes CGI.pm treat all parameters as UTF-8 strings. Use this with
care, as it will interfere
with the processing of binary uploads. It is better to
manually select which fields are expected
to return utf-8 strings and convert them using code like
this:

  use Encode;
  my $arg = decode utf8=>param('foo');
---
 tools/viewlog.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/viewlog.pl b/tools/viewlog.pl
index e48aaef..533f00e 100755
--- a/tools/viewlog.pl
+++ b/tools/viewlog.pl
@@ -21,7 +21,7 @@
 use strict;
 #use warnings; FIXME - Bug 2505
 use C4::Auth;
-use CGI;
+use CGI qw/-utf8/;
 use C4::Context;
 use C4::Koha;
 use C4::Dates;
-- 
1.7.10.4