md5 can't handle wide chars

master
joey 2006-07-30 05:17:59 +00:00
parent c5b02885e9
commit 68d7fbfabd
1 changed files with 2 additions and 1 deletions

View 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;