[pmwiki-users] umlauts and Author-Defined Wiki Styles conflict

sti at pooq.com sti at pooq.com
Tue Oct 9 12:13:25 CDT 2007


noskule wrote:
> hi list
> 
> I defined a selfgroup style that highlights a link (horizontal
> navigation) as long as the user surfs in the same group, works, an looks
> like this:
> 
> %define=hl{*$Group} class=selfgroup%
> 
> The problem ist that it only works as long as the groups DO NOT contain
> any umlauts.

There are two problems which need to be overcome for this to work. The first
is that wikistyles are detected by a PCRE (perl-compatible regular expression)
and the PCRE library for php may, or may not, have utf-8 enabled.

If it doesn't, you won't be able to get what you want to work.

If you DO have a utf-8 compatible PCRE library, you can try modifying the
Markup for %define to explicitly match utf-8 characters:

Markup('%define=', '>split',
  "/^(?=%define=)((?:$WikiStylePattern)\\s*)+$/ue",
  "PZZ(ApplyStyles(PSS('$0')))");

You'll note that the second line now ends /ue, rather than just /e
IIRC you may need to do something to undefine the current definition of the
'%define=', before it will accept a replacement, but I don't remember how
that's done.

I hope this helps!



More information about the pmwiki-users mailing list