aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorFeng Shu <tumashu@163.com>2018-12-02 08:41:39 +0800
committerSimon McVittie <smcv@debian.org>2019-01-31 20:37:06 +0000
commit2965846ef28e1be6f99e476d723a14fe98dd0977 (patch)
treef2e6cd14c51c53b84708d1fedfdb780d79b5dc9b /IkiWiki
parent3c66dca6eabcb18e96359a5930ee6e57a1e86d9c (diff)
downloadikiwiki-2965846ef28e1be6f99e476d723a14fe98dd0977.tar
ikiwiki-2965846ef28e1be6f99e476d723a14fe98dd0977.tar.gz
Fix table plugin can handle UTF-8 csv format
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/table.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm
index f3c425a37..7fea8ab1c 100644
--- a/IkiWiki/Plugin/table.pm
+++ b/IkiWiki/Plugin/table.pm
@@ -135,6 +135,7 @@ sub split_csv ($$) {
my $csv = Text::CSV->new({
sep_char => $delimiter,
binary => 1,
+ decode_utf8 => 1,
allow_loose_quotes => 1,
}) || error("could not create a Text::CSV object");
@@ -143,7 +144,7 @@ sub split_csv ($$) {
foreach my $line (@text_lines) {
$l++;
if ($csv->parse($line)) {
- push(@data, [ map { decode_utf8 $_ } $csv->fields() ]);
+ push(@data, [ $csv->fields() ]);
}
else {
debug(sprintf(gettext('parse fail at line %d: %s'),