1 I have ikiwiki_3.20111229 installed on Debian Squeeze (Perl 5.10.1, UTF-8
2 locale). The attachment plugin mangles UTF8-encoded attachment filenames if
3 the name contains multibyte characters, e.g. "lää.png" becomes "lää.png".
4 Apparently glob returns byte strings which are subject to implicit
5 upgrading when concatenated with Perl strings. The following patch fixes
10 diff -r -U 1 a/attachment.pm b/attachment.pm
11 --- a/attachment.pm 2012-01-13 23:07:29.000000000 +0200
12 +++ b/attachment.pm 2012-01-13 23:33:07.000000000 +0200
14 foreach my $filename (glob("$dir/*")) {
15 + $filename=Encode::decode_utf8($filename);
16 next unless -f $filename;
18 foreach my $file (glob("$dir/*")) {
19 + $file = Encode::decode_utf8($file);
22 > Seems it only mangled display of the just-uploaded attachment's filename,
23 > the attachment was otherwise saved to disk with a valid UTF-8 name, and
24 > doing other stuff with it also was ok. In any case, I applied your patch,
25 > thanks. [[done]] --[[Joey]]