X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FCategory.pm;h=85361286a762f079283bf2e15b08445ea15ea3d5;hb=9d65f665360f259ebbb532a82715c083bfc39c89;hp=b81e88f4a8b4ff3d58e0844461224591b23954f8;hpb=4c14cd317e92cb44aed69f09e99438f694ae32e5;p=koha_gimpoz diff --git a/C4/Category.pm b/C4/Category.pm index b81e88f4a8..85361286a7 100644 --- a/C4/Category.pm +++ b/C4/Category.pm @@ -71,13 +71,12 @@ C. =cut sub all { - my ($class) = @_; - my $dbh = C4::Context->dbh; - return map { $class->new($_) } @{$dbh->selectall_arrayref( - # The categories table is small enough for - # `SELECT *` to be harmless. - "SELECT * FROM categories ORDER BY description", - { Slice => {} }, + my $class = shift; + map { + utf8::encode($_->{description}); + $class->new($_); + } @{C4::Context->dbh->selectall_arrayref( + "SELECT * FROM categories ORDER BY description", { Slice => {} } )}; }