1 I have a page with the name "umläute". When I try to remove it, ikiwiki says:
3 Error: ?umläute does not exist
5 > I'm curious about the '?' in the "?umläute" message. Suggests that the
6 > filename starts with another strange character. Can I get a copy of a
7 > git repository or tarball containing this file? --[[Joey]]
9 I wrote the following patch, which seems to work on my machine. I'm running on FreeBSD 6.3-RELEASE with ikiwiki-3.20100102.3 and perl-5.8.9_3.
11 --- remove.pm.orig 2009-12-14 23:26:20.000000000 +0100
12 +++ remove.pm 2010-01-18 17:49:39.000000000 +0100
14 # and that the user is allowed to edit(/remove) it.
16 foreach my $page (@pages) {
17 + $page = Encode::decode_utf8($page);
18 check_canremove($page, $q, $session);
20 # This untaint is safe because of the
23 > The problem with this patch is that, in a recent fix to the same
24 > plugin, I made `@pages` come from `$form->field("page")`, and
25 > that, in turn is already run through `decode_form_utf8` just above the
26 > code you patched. So I need to understand why that is apparently not
27 > working for you. (It works fine for me, even when deleting a file named
28 > "umläute" --[[Joey]]
32 > Update, having looked at the file in the src of the wiki that
33 > is causing trouble for remove, it is: `uml\303\203\302\244ute.mdwn`
34 > And that is not utf-8 encoded, which, represented the same
35 > would be: `uml\303\244ute.mdwn`
37 > I think it's doubly-utf-8 encoded, which perhaps explains why the above
38 > patch works around the problem (since the page name gets doubly-decoded
39 > with it). The patch doesn't fix related problems when using remove, etc.
41 > Apparently, on apoca's system, perl encodes filenames differently
42 > depending on locale settings. On mine, it does not. Ie, this perl
43 > program always creates a file named `uml\303\244ute`, no matter
44 > whether I run it with LANG="" or LANG="en_US.UTF-8":
46 > perl -e 'use IkiWiki; writefile("umläute", "./", "baz")'
48 > Remains to be seen if this is due to the older version of perl used
49 > there, or perhaps FreeBSD itself. --[[Joey]]
51 > Update: Perl 5.10 fixed the problem. --[[Joey]]