aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttps://www.google.com/accounts/o8/id?id=AItOawlxhTpXjVrFtgk7H7La4U7dZSob-r0680U <Jukka@web>2012-01-13 19:00:13 -0400
committeradmin <admin@branchable.com>2012-01-13 19:00:13 -0400
commit059671fc4562a6e4dd55e092ec9a31038b14ef45 (patch)
treeb5025278180d2e523bab0c592bcba059a5d24500
parent6b0ac401cdbe3a0e4a6997411542e1e0598ccbe5 (diff)
downloadikiwiki-059671fc4562a6e4dd55e092ec9a31038b14ef45.tar
ikiwiki-059671fc4562a6e4dd55e092ec9a31038b14ef45.tar.gz
-rw-r--r--doc/bugs/UTF-8_in_attachment_filenames.mdwn15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/bugs/UTF-8_in_attachment_filenames.mdwn b/doc/bugs/UTF-8_in_attachment_filenames.mdwn
new file mode 100644
index 000000000..6e79a4e06
--- /dev/null
+++ b/doc/bugs/UTF-8_in_attachment_filenames.mdwn
@@ -0,0 +1,15 @@
+I have ikiwiki_3.20111229 installed on Debian Squeeze (Perl 5.10.1, UTF-8 locale). The attachment plugin mangles UTF8-encoded attachment filenames if the name contains multibyte characters, e.g. "lää.png" becomes "lää.png". Apparently glob returns byte strings which are subject to implicit upgrading when concatenated with Perl strings. The following patch fixes the problem for me:
+
+----
+
+ diff -r -U 1 a/attachment.pm b/attachment.pm
+ --- a/attachment.pm 2012-01-13 23:07:29.000000000 +0200
+ +++ b/attachment.pm 2012-01-13 23:33:07.000000000 +0200
+ @@ -274,2 +274,3 @@
+ foreach my $filename (glob("$dir/*")) {
+ + $filename=Encode::decode_utf8($filename);
+ next unless -f $filename;
+ @@ -347,2 +348,3 @@
+ foreach my $file (glob("$dir/*")) {
+ + $file = Encode::decode_utf8($file);
+ next unless -f $file;