* table: Text::CSV doesn't return decoded unicode (XS module); decode its
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 5 Sep 2007 17:22:26 +0000 (17:22 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 5 Sep 2007 17:22:26 +0000 (17:22 +0000)
  return values.

IkiWiki.pm
IkiWiki/Plugin/table.pm
debian/changelog

index 0c1df8b474067375f6eb6d637a0250bf095a93fd..720afdecd0faabf496f8e93797be1174b010c91c 100644 (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,
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'), 
index 4ef51d952c6526f47b4c26b676592a112d2518cb..506047d0376cf34938051288b9cfa94f7c6b8360 100644 (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