Re: Re: Question to Slovak Wikipedia SW

Tomasz Wegrzanowski <[email protected]> Wed, 25 Feb 2004 02:45:59 +0100
Newsgroups gmane.science.linguistics.wikipedia.international
Message-ID <[email protected]>
On Tue, Feb 24, 2004 at 05:33:23PM -0800, Brion Vibber wrote:
> >"Stanislav Valasek" <[email protected]> schrieb:
> >> during a translation of LanguageSk.php we found out a variable:
> >> "linktrail"        => "/^([a-z]+)(.*)$/sD"
> [snip]
> On Feb 25, 2004, at 01:22, Andre Engels wrote:
> >On nl: I have for example changed this to 
> >"/^([äöüïëéèàa-z]+)(.*)$/sD", so that
> >äöüïëéèà are also all seen as letters for this purpose.
> 
> Note that for the wikis using UTF-8 encoding, one non-ASCII character 
> is composed of more than one byte, and the regexp matching currently 
> works on bytes. So you'd have to make it something like this:
> 
> >"/^((?:ä|ö|ü|ï|ë|é|è|à|[a-z])+)(.*)$/sD"
> 
> The [] bits match single characters (really bytes), and (||) matches 
> longer sequences. The ?: is to avoid messing up the returned match 
> sequence. Yuck! Sorry, it's one of those ugly implementation details 
> that we shouldn't have to expose...

Doesn't PHP have perl-style -C switch for unicode regular expressions ?