[dokuwiki] Re: Sitemap and fnencode=safe

  • From: Michael Hamann <michael@xxxxxxxxxxxxxxxx>
  • To: dokuwiki <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 26 Oct 2010 19:16:22 +0200

Hi,

Excerpts from Myron Turner's message of 2010-10-26 18:01:06 +0200:
> When fnencode='safe', the Safe Ascii listings in the sitemap conflate 
> the .txt. extension and the file's name, so that the listing shows up as 
> file_nametxt instead of as file_name.

I can reproduce that in the index view but not in the generated sitemap.
The filename is data/pages/umlaut/l%C3%A4ute.txt and the displayed id is
lǓtxt (but should be läute) and is displayed as nonexistent.

I've looked a bit into the code and the problem is basically that
DokuWiki assumes that the configured filename encoding is the used one.
Thus if you change the encoding you have to convert all old filenames to
the new encoding. I'm not sure if it will be possible to add a system
that guesses the filename encoding. As % is not allowed in ids
every filename that contains a "%" is not plain utf8. URL-encoded
filenames contain uppercase characters and the typical sequence %..%..
etc. while "safe"-encoded filenames must contain more than a dot and
don't contain uppercase characters. And every filename that contains
non-ASCII characters is certainly utf8. I think we should think a bit
more about that but perhaps it is easily possible to add certain quick
tests to check if the selected encoding is valid and if not fall back to
the most probable one.

> This is true of "Lazy" and is still true as of last night's latest 
> splitbrain download:  2009-12-25-511-g88c5fee.
> 
> firebug is also giving me this error:
>   initializeHotkeys is not defined
> http://myserver.xxx/latest/lib/exe/js.php?tseed=1288111137 Line 1

I've pushed a fix for that second issue.

Michael
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: