From 83a3c6437209be78d55c641b7969bf20d487102a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Jun 2014 17:04:03 +0200 Subject: [PATCH] Bug 12411: Preferences values should be utf8 encoded MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test plan: Fill OPACMySummaryNote or NoLoginInstructions with something like "éàç" and verify the display is broken. Signed-off-by: Paola Rossi Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi Works as described. Fixes the issue. --- Koha/Template/Plugin/Koha.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm index 2eff9f1428..6b95e3ba82 100644 --- a/Koha/Template/Plugin/Koha.pm +++ b/Koha/Template/Plugin/Koha.pm @@ -18,6 +18,7 @@ package Koha::Template::Plugin::Koha; # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use Modern::Perl; +use Encode qw( encode ); use base qw( Template::Plugin ); @@ -41,7 +42,7 @@ is necessary. sub Preference { my ( $self, $pref ) = @_; - return C4::Context->preference( $pref ); + return encode('UTF-8', C4::Context->preference( $pref ) ); } 1; -- 2.39.5