From 8489e68916eabf0ce09242e4dac66b9f646d46c4 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 5 Sep 2007 17:22:26 +0000 Subject: * table: Text::CSV doesn't return decoded unicode (XS module); decode its return values. --- IkiWiki/Plugin/table.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Plugin/table.pm') diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm index c7b664052..01ba5e504 100644 --- a/IkiWiki/Plugin/table.pm +++ b/IkiWiki/Plugin/table.pm @@ -3,6 +3,7 @@ package IkiWiki::Plugin::table; use warnings; use strict; +use Encode; use IkiWiki 2.00; sub import { #{{{ @@ -104,7 +105,7 @@ sub split_csv ($$) { #{{{ foreach my $line (@text_lines) { $l++; if ($csv->parse($line)) { - push(@data, [ $csv->fields() ]); + push(@data, [ map { decode_utf8 $_ } $csv->fields() ]); } else { debug(sprintf(gettext('parse fail at line %d: %s'), -- cgit v1.2.3