Issues

ZF-2108: Different pattern may be needed for some language in Zend_Filter_Alpha.

Issue Type: Bug Created: 2007-10-28T22:39:07.000+0000 Last Updated: 2011-08-03T14:25:55.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: old of Satoru Yoshida (yoshida@zend.co.jp) Assignee: Satoru Yoshida (satoruyoshida) Tags: - Zend_Filter

Related issues: - ZF-2073

Attachments: - zf_2108_20071126.txt

Description

Now , following pattern is used for UTF-8 since ZF-1483. '/[^\p{L}' . $whiteSpace . ']/u';

In Polish it may be suitable, but in Japanese the pattern is uncomfortable.

I think it seems like some language should have own pettern. The ZF-1248 may be better idea, i think. But I will propose a solution as next best in following.

if (!self::$_unicodeEnabled) {

$pattern = '/[^a-zA-Z' . $whiteSpace . ']/';

} else {

if (extension_loaded('mbstring')) \{

    /*for example, Japanese, Chinese, Korean.*/

    $pattern = '/[^[:alpha:]' . $whiteSpace . ']/u';

} else {

    /*for example, Polish, Czech  */

    $pattern = '/[^\p{L}' . $whiteSpace . ']/u';

}

}

Comments

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-13T19:02:47.000+0000

I mistook in the discription. I correct in following. ^\p{Ll}\p{Lu} is more better.

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-26T03:17:41.000+0000

I change the title from "Ll and Lu should be used in Zend_Filter_Alpha." to "Different pattern may be needed for some language in Zend_Filter_Alpha."

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-26T03:25:28.000+0000

typo

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-26T03:27:52.000+0000

typo

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-26T03:29:09.000+0000

typo

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-26T03:38:33.000+0000

Code in my Description

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-11-27T01:04:17.000+0000

I make test pattern for Zend_Filter_AlphaTest.php . I hope this will be useful.

Posted by Wil Sinclair (wil) on 2007-12-14T18:24:47.000+0000

What is the status of this issue and what action do we want to take on it?

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2007-12-17T00:17:54.000+0000

I offered a solution in the file attachments, but it does not be discussed or applied.

Posted by Darby Felton (darby) on 2008-01-29T09:50:30.000+0000

Assigning to [~yoshida@zend.co.jp]. Please contact me directly when you are ready to commit your changes, and I'll take care of giving you SVN credentials (e.g., username and password) needed to commit successfully. Thank you! :)

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2008-03-09T10:35:41.000+0000

Resolved in SVN r8710

Posted by Wil Sinclair (wil) on 2008-03-21T18:48:50.000+0000

Did this make it in to 1.5.0?

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2008-03-21T20:29:04.000+0000

No , I thought it into 1.0.5 if 1.0.5 is scheduled. But I find now it into 1.5.0 . So, I change list box of Fix Version to 1.5.0.

Posted by Darby Felton (darby) on 2008-04-02T09:03:03.000+0000

Yes, these changes made it into 1.5.0 with SVN r8732 (see Fisheye or All tab).

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts