Home arrow Forum

Remository Forum

 


thatch10

Karma: 0  
Problems with regex - 2010/08/22 23:37 I am getting the error code 'Compilation failed: support for P, p, and X has not been compiled at offset 4' following an upgrade to Glossary 2.7.

I believe that reading around it is due to my server PRCE was compiled with the “–enable-utf8″ configure option but not compiled with the “–enable-unicode-properties” configure option which works in conjunction with the enable-utf8 option to add support for the ‘p’, ‘P’, and ‘X’ character classes

would it be better to to check for PHP UTF-8 support before using the following code which is causing the error

$words = preg_split('/((^p{P}+)|(p{P}*s+p{P}*)|(p{P}+$))/u', strip_tags($term), -1, PREG_SPLIT_NO_EMPTY);

I have requested the hosts of the serverfix for my use but not holding my breath.

Thatch10
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 98  
Re:Problems with regex - 2010/08/31 10:59 Hmm - the problem and the reason for starting to use those classes was that the regular expression engine does not correctly handle the w and W in a multi-lingual UTF-8 environment. If I put them back in as a fallback, the results may still be unsatisfactory.

Correct me if I'm wrong, but so far the only UTF-8 reliable way I've found to split text into words is the one currently used.
Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.

Save FM Radio

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 12 guest online