Re: danish chars

[email protected] Tue, 5 Apr 2005 04:42:06 -0400
Newsgroups gmane.comp.web.wiki.awkiawki.user
Message-ID <[email protected]>
OK, pages can be displayed but not edited. Here's why. The URL for 
displaying the page RødGrød is:

    http://atte.dk/awkihack/R%F8dGr%F8d

The URL for editing the same page is:

    http://atte.dk/awkihack?edit=true&page=R%F8dGr%F8d

If we change the URL for displaying the page to:

    http://atte.dk/awkihack?page=R%F8dGr%F8d

we get the ForSide page. So, that leads us to the clear_pagename() 
function. Notice that it returns "" if the regular expression doesn't 
match. Since query["page"] doesn't get decoded, it still has %xx stuff 
in it, which doesn't match the regular expression. The solution, _if_ 
your file system will allow the Danish characters in filenames, is to 
decode the page name. Change line 77 to:

            query["page"] = clear_pagename(decode(query["page"]))


On Apr 4, 2005, at 6:54 PM, Atte André Jensen wrote:

> [email protected] wrote:
>
>> Can you copy the URL from one of the linkified WikiNames that has one 
>>  or more danish characters in it and e-mail it? I'd like to see what 
>> the  browser is passing to awkiawki when you try to open the page for 
>>  editing.
>
> Here are a few examples for you to try:
>
> http://atte.dk/awkihack
>
> http://atte.dk/awkihack/%C6bleMand
> http://atte.dk/awkihack/R%F8dGr%F8d
>
> Should have been ÆbleMand and RødGrød before rewrite...
>
> -- 
> peace, love & harmony
> Atte
>
> http://www.atte.dk
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click