Robert Murphy wrote: > I discovered that since I'd updated a template concerned > solely with my Greek language pages, is generating an error on every update: > > 2008-09-18 12:16:05 494100 refreshLinks Greek:ΑΙΩΝ > PHP Warning: preg_split(): Compilation failed: nothing to repeat at > offset 8 in > ... extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php > on line 754 > > Every single update is generating this error! Any ideas as to why regex > is freaking out over unicode?
Many characters in Unicode are made of multiple bytes, and when PHP comes along and processes a string byte-by-byte, part of your Greek symbol might look like a pattern code like / or NON-BREAKING SPACE or something. This sounds like https://bugzilla.wikimedia.org/show_bug.cgi?id=13321 How old a version of SMW are you running? Markus marked this fixed in March 2008. Try modifying that line 754 in SMW_QueryProcessor.php to add 'u' on the end of the preg_split, which tells PHP "don't scan byte-by-byte, look Unicode character-by-character" , see <http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php>. I'm not sure what version you have, but e.g. if the line is $list = preg_split('/^\*/',$value,2); change it to $list = preg_split('/^\*/u',$value,2); PLEASE let semediawiki-devel list know if that fixes it. To my clueless eye, all regular expressions in the file that might tickle the problem have the /u modifier. -- =S ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel