[Pmwiki-users] Re: accented characters

Christian Ridderström chr
Sun Feb 1 12:21:48 CST 2004


On Sun, 1 Feb 2004, Patrick R. Michaud wrote:

> On Sat, Jan 31, 2004 at 11:09:14PM +0100, Jean-Claude wrote:
> > Congratulations, Patrick, you made my browser work!
> > 
> > For my own culture, would share a part of the "trick" ?
> 
> Sure, although it gets fairly technical, and some may need some background.
> If you want to skip the background and details, just jump to the bottom
> paragraph that says "Solution:".
[snip]

> In PHP I solved it with two lines of code:
> 
>    if (preg_match('/[\\x80-\\xbf]/',$pagename)) 
>        $pagename=utf8_decode($pagename);

Shouldn't you decode the entire URI? I can imagine that the arguments to 
a search may contain characters that needs decoding as well..

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list