From ecda2febd9e15a8880d8c039c4cc83c73e03f3bf Mon Sep 17 00:00:00 2001
From: Paul Poulain <paul.poulain@biblibre.com>
Date: Fri, 28 Sep 2012 16:45:37 +0200
Subject: [PATCH] Bug 8215 follow-up encoding for branches & itemtypes
Content-Type: text/plain; charset="utf-8"
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
---
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 ad768a5..e201ff7 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 60ca979..abccbf4 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'});
}
--
1.7.2.5