* table: Text::CSV doesn't return decoded unicode (XS module); decode its

return values.
master
joey 2007-09-05 17:22:26 +00:00
parent b3f2cc414f
commit 8489e68916
3 changed files with 6 additions and 3 deletions

View File

@ -903,7 +903,7 @@ sub template_params (@) { #{{{
my @ret=(
filter => sub {
my $text_ref = shift;
${$text_ref} = Encode::decode_utf8(${$text_ref});
${$text_ref} = decode_utf8(${$text_ref});
},
filename => $filename,
loop_context_vars => 1,

View 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'),

4
debian/changelog vendored
View File

@ -35,8 +35,10 @@ ikiwiki (2.7) UNRELEASED; urgency=low
* Correct generation of RFC 3339 format times for atom/rss feeds. Always use
gmtime for these since a time zone is not specified.
* Updated Spanish translation from Victor Moral.
* table: Text::CSV doesn't return decoded unicode (XS module); decode its
return values.
-- Joey Hess <joeyh@debian.org> Tue, 04 Sep 2007 13:30:32 -0400
-- Joey Hess <joeyh@debian.org> Tue, 04 Sep 2007 15:19:18 -0400
ikiwiki (2.6.1) unstable; urgency=low