From 5c4c680fa69c2af8643a61268b5568c57401e5b1 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy 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 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'); Signed-off-by: Jared Camins-Esakov (cherry picked from commit de7ba790fd2533bcf44ad7fd2f1255514ed9313c) Signed-off-by: Jared Camins-Esakov --- tools/viewlog.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index e48aaef4c5..533f00ede0 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; -- 2.39.5