From a38032e4697da690aa215c51f3b644ee49634b21 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Fri, 28 Sep 2012 16:45:37 +0200 Subject: [PATCH] Bug 8215 follow-up encoding for branches & itemtypes Signed-off-by: Kyle M Hall Signed-off-by: Corinne Bulac Signed-off-by: Jonathan Druart --- Koha/Template/Plugin/Branches.pm | 3 ++- Koha/Template/Plugin/ItemTypes.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm index ad768a5ef8..e201ff78df 100644 --- a/Koha/Template/Plugin/Branches.pm +++ b/Koha/Template/Plugin/Branches.pm @@ -21,6 +21,7 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); +use Encode qw{encode decode}; use C4::Koha; @@ -31,7 +32,7 @@ sub GetName { my $sth = C4::Context->dbh->prepare($query); $sth->execute($branchcode); my $b = $sth->fetchrow_hashref(); - return $b->{'branchname'}; + return encode('UTF-8', $b->{'branchname'}); } 1; diff --git a/Koha/Template/Plugin/ItemTypes.pm b/Koha/Template/Plugin/ItemTypes.pm index 60ca979ce1..abccbf49a9 100644 --- a/Koha/Template/Plugin/ItemTypes.pm +++ b/Koha/Template/Plugin/ItemTypes.pm @@ -21,6 +21,7 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); +use Encode qw{encode decode}; use C4::Koha; @@ -31,7 +32,7 @@ sub GetDescription { my $sth = C4::Context->dbh->prepare($query); $sth->execute($itemtype); my $d = $sth->fetchrow_hashref(); - return $d->{'description'}; + return encode('UTF-8', $d->{'description'}); } -- 2.39.5