package UCW::Gallery::Hashes;
-use strict;
-use warnings;
+use common::sense;
use File::stat ();
use Digest::SHA;
+use Encode;
sub new {
my ($class, $gal) = @_;
my $st = File::stat::stat($path) or die "Cannot access $path: $!\n";
my $key_text = join(":", $path, $st->dev, $st->ino, $st->mtime);
- my $key = Digest::SHA->sha1_base64($key_text);
+ my $key = Digest::SHA->sha1_base64(Encode::encode_utf8($key_text));
if (!exists $cache->{$key}) {
my $sha = Digest::SHA->new(1);