[Pmwiki-users] Re: accented characters

Patrick R. Michaud pmichaud
Sun Feb 1 12:52:25 CST 2004


On Sun, Feb 01, 2004 at 08:21:33PM +0100, Christian Ridderstr?m wrote:
> > 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..

I did think about that, but since nobody has ever reported a problem
with special characters in searching I concluded that it already works 
and I better not muck with it.  Indeed, I just checked and my version 
of IE seems to only UTF-8 encode characters in the path part of a URI
--it leaves the query arguments alone.  (It doesn't even seem to
URL-encode them.)

Plus, the trick I'm using to resolve pagenames might not work for
strings in other parameters, because those parameters could contain
(non-alphabetic) characters in the %a0-%bf range that are valid for
the search/parameter.

Pm



More information about the pmwiki-users mailing list