From 3fd8e4a13c361ad33d4cb02a7d77155f752b9f06 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Jan 2021 10:02:45 +0100 Subject: [PATCH] Bug 24272: Correctly encode output to prevent 'Wide character in say' Signed-off-by: Jonathan Druart (cherry picked from commit 67b1b20e33f5d73ea515ea3b4d244dde73576448) Signed-off-by: Fridolin Somers --- misc/maintenance/check_syspref_cache.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/maintenance/check_syspref_cache.pl b/misc/maintenance/check_syspref_cache.pl index 3de4b27f78..a25b977bda 100755 --- a/misc/maintenance/check_syspref_cache.pl +++ b/misc/maintenance/check_syspref_cache.pl @@ -18,6 +18,7 @@ use Modern::Perl; use Getopt::Long; use Pod::Usage; +use Encode qw( encode_utf8 ); use Koha::Script; use Koha::Caches; @@ -54,6 +55,6 @@ while (my $pref = $prefs->next) { my $var = lc $pref->variable; my $cached_var = $syspref_cache->get_from_cache("syspref_$var"); next unless defined $cached_var; #If not defined in cache we will fetch from DB so this case is OK - say sprintf( "%s: value in cache is '%s' and value in db is '%s'", $var, $cached_var, $pref->value ) + say encode_utf8( sprintf( "%s: value in cache is '%s' and value in db is '%s'", $var, $cached_var, $pref->value ) ) unless $cached_var eq $pref->value; } -- 2.39.5