]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/table.pm
* table: Text::CSV doesn't return decoded unicode (XS module); decode its
[git.ikiwiki.info.git] / IkiWiki / Plugin / table.pm
index c7b6640525d6b88f4d6b58ac70164d222bbf8038..01ba5e5042360d218d422e56296a6161552ff8fe 100644 (file)
@@ -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'),