summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/VN.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-11-01 13:14:11 +0100
committerYorhel <git@yorhel.nl>2015-11-01 13:36:24 +0100
commit3c967881d7b5408a49f16de8b268b053d6ba9051 (patch)
treeaa72703bbc1b755cd491070db44e7050e9ea7210 /lib/VNDB/DB/VN.pm
parent3de8d24697511fe324cae2526eb65d6aafb5968b (diff)
DB::(Producers|VN): Convert svg column to perl encoding when fetching
DBD::Pg doesn't recognize the 'xml' data type as textual data, and thus doesn't decode it for us. This fixes the display of non-ASCII characters.
Diffstat (limited to 'lib/VNDB/DB/VN.pm')
-rw-r--r--lib/VNDB/DB/VN.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 691b0eb3..dba48e23 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -123,6 +123,7 @@ sub dbVNGet {
join(', ', @select), join(' ', @join), \@where, $order,
);
+ $_->{svg} && ($_->{svg} = decode_utf8($_->{svg})) for (@$r);
return _enrich($self, $r, $np, 0, $o{what});
}