From f072f3a9c57bc590b4fb754a7cf65b5f93684006 Mon Sep 17 00:00:00 2001 From: "http://apoca.myopenid.com/" Date: Mon, 18 Jan 2010 17:25:13 +0000 Subject: --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/bugs/removing_pages_with_utf8_characters.mdwn (limited to 'doc/bugs/removing_pages_with_utf8_characters.mdwn') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn new file mode 100644 index 000000000..a962a328a --- /dev/null +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -0,0 +1,18 @@ +I have a page with the name "umläute". When I try to remove it, ikiwiki says: + +Error: ?umläute does not exist + +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. + + --- remove.pm.orig 2009-12-14 23:26:20.000000000 +0100 + +++ remove.pm 2010-01-18 17:49:39.000000000 +0100 + @@ -193,6 +193,7 @@ + # and that the user is allowed to edit(/remove) it. + my @files; + foreach my $page (@pages) { + + $page = Encode::decode_utf8($page); + check_canremove($page, $q, $session); + + # This untaint is safe because of the + + -- cgit v1.2.3 From 265b4f0576d5e6be61d80239db372430c52f31b7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Jan 2010 12:38:05 -0500 Subject: response --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/bugs/removing_pages_with_utf8_characters.mdwn') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn index a962a328a..77ec00575 100644 --- a/doc/bugs/removing_pages_with_utf8_characters.mdwn +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -2,6 +2,10 @@ I have a page with the name "umläute". When I try to remove it, ikiwiki says: Error: ?umläute does not exist +> I'm curious about the '?' in the "?umläute" message. Suggests that the +> filename starts with another strange character. Can I get a copy of a +> git repository or tarball containing this file? --[[Joey]] + 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. --- remove.pm.orig 2009-12-14 23:26:20.000000000 +0100 @@ -16,3 +20,9 @@ I wrote the following patch, which seems to work on my machine. I'm running on F # This untaint is safe because of the +> The problem with this patch is that, in a recent fix to the same +> plugin, I made `@pages` come from `$form->field("page")`, and +> that, in turn is already run through `decode_form_utf8` just above the +> code you patched. So I need to understand why that is apparently not +> working for you. (It works fine for me, even when deleting a file named +> "umläute" --[[Joey]] -- cgit v1.2.3 From 4a8389825ae0715ba68846881ddc8d25b3f9ccb8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Jan 2010 18:00:10 -0500 Subject: update --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc/bugs/removing_pages_with_utf8_characters.mdwn') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn index 77ec00575..2fa4efa8b 100644 --- a/doc/bugs/removing_pages_with_utf8_characters.mdwn +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -26,3 +26,24 @@ I wrote the following patch, which seems to work on my machine. I'm running on F > code you patched. So I need to understand why that is apparently not > working for you. (It works fine for me, even when deleting a file named > "umläute" --[[Joey]] + +---- + +> Update, having looked at the file in the src of the wiki that +> is causing trouble for remove, it is: `uml\303\203\302\244ute.mdwn` +> And that is not utf-8 encoded, which, represented the same +> would be: `uml\303\244ute.mdwn` +> +> I think it's doubly-utf-8 encoded, which perhaps explains why the above +> patch works around the problem (since the page name gets doubly-decoded +> with it). The patch doesn't fix related problems when using remove, etc. +> +> Apparently, on apoca's system, perl encodes filenames differently +> depending on locale settings. On mine, it does not. Ie, this perl +> program always creates a file named `uml\303\244ute`, no matter +> whether I run it with LANG="" or LANG="en_US.UTF-8": +> +> perl -e 'use IkiWiki; writefile("umläute", "./", "baz")' +> +> Remains to be seen if this is due to the older version of perl used +> there, or perhaps FreeBSD itself. --[[Joey]] -- cgit v1.2.3 From 30c5f62f741b8be4677b46b19a6c7ccb5963e101 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Jan 2010 20:41:12 -0500 Subject: update --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/bugs/removing_pages_with_utf8_characters.mdwn') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn index 2fa4efa8b..0d96aa75f 100644 --- a/doc/bugs/removing_pages_with_utf8_characters.mdwn +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -47,3 +47,5 @@ I wrote the following patch, which seems to work on my machine. I'm running on F > > Remains to be seen if this is due to the older version of perl used > there, or perhaps FreeBSD itself. --[[Joey]] +> +> Update: Perl 5.10 fixed the problem. --[[Joey]] -- cgit v1.2.3