Bug 6371 Item Types description not properly displayed if not pure ASCII
In several places, C4::ItemType module is used to retrieve item types
and their description. If the description text contains non-ASCII
characters, those characters are not properly displayed.
This bug can be seen in:
- 4xx plugin of a UNIMARC DB
- Home > Admin > Item circulation alerts
- others?...
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Fixes display probems in circulation alerts and 4xx UNIMARC plugin
- display in other places looks ok with and without patch
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 7d599afe6d)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
e131d2eebc
commit
143479ab2e
|
|
@ -73,12 +73,15 @@ C<description>.
|
|||
sub all {
|
||||
my ($class) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
return map { $class->new($_) } @{$dbh->selectall_arrayref(
|
||||
# The itemtypes table is small enough for
|
||||
# `SELECT *` to be harmless.
|
||||
"SELECT * FROM itemtypes ORDER BY description",
|
||||
{ Slice => {} },
|
||||
)};
|
||||
|
||||
my @itypes;
|
||||
for ( @{$dbh->selectall_arrayref(
|
||||
"SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} )
|
||||
{
|
||||
utf8::encode($_->{description});
|
||||
push @itypes, $class->new($_);
|
||||
}
|
||||
return @itypes;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue