md5 can't handle wide chars
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 30 Jul 2006 05:17:59 +0000 (05:17 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 30 Jul 2006 05:17:59 +0000 (05:17 +0000)
IkiWiki/Plugin/aggregate.pm

index 89885464106e5b2c5c6e89c15ff7fbb09f9bc9cf..0ad24dcd055387a669f30a0585fd5acf98c5eeb2 100644 (file)
@@ -257,7 +257,8 @@ sub add_page (@) { #{{{
        # to avoid unneccessary rebuilding. The mtime from rss cannot be
        # trusted; let's use a digest.
        eval q{use Digest::MD5 'md5_hex'};
-       my $digest=md5_hex($params{content});
+       require Encode;
+       my $digest=md5_hex(Encode::encode_utf8($params{content}));
        return unless ! exists $guid->{md5} || $guid->{md5} ne $digest;
        $guid->{md5}=$digest;