ZF-1483: Zend_Filter_Alpha has problems with utf8 strings

Issue Type: Patch Created: 2007-06-04T06:40:30.000+0000 Last Updated: 2007-07-05T14:44:15.000+0000 Status: Resolved Fix version(s): - 1.0.0 RC2 (08/Jun/07)

Reporter: Marcin Lulek (ergo14) Assignee: Darby Felton (darby) Tags: - Zend_Filter

Related issues: - ZF-269



filtering a string like "grzegżółka" will cause problems

there is need to have regex with PCRE_UTF8 enabled to perform correctly.


return preg_replace('/[^[:alpha:]]/', '', (string) $value);


return preg_replace('/[\p{^L}]/u', '', (string) $value);

should work fine


Posted by Darby Felton (darby) on 2007-06-04T14:04:34.000+0000

Resolved with SVN r5099.

Posted by Christian Gräfe (cgraefe) on 2007-06-19T06:46:51.000+0000

I can see why this change was made, but for me it is causing problems on certain platforms. On some, the extendes PCRE syntax "\p{}" doesn't seem to match anything. I could quite figure out what exactly is causing this problem. Up to now, I tried the following platforms:

Not working: Fedora Core 5, PHP 5.1.6, PCRE 6.3 Fedora Core 6, PHP 5.1.6, PCRE 6.6

Working: Fedora 7, PHP 5.2.2, PCRE 7.0 Solaris 10 x86, PHP 5.1.5, PCRE 6.6 Debian Etch, PHP 4.4.4, PCRE 6.7

Maybe, you could amend the docs to state the exact prerequisites to get Zend_Filter_Alnum et al. to work. That would surely help me a lot. :-)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.