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

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

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

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."

typo

typo

typo

Code in my Description

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

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

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

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! :)

Resolved in SVN r8710

Did this make it in to 1.5.0?

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.

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