Zend Framework

Different pattern may be needed for some language in Zend_Filter_Alpha.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.0.2
  • Fix Version/s: 1.5.0
  • Component/s: Zend_Filter
  • Labels:
    None
  • Fix Version Priority:
    Should Have

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';

}

}

Issue Links

Activity

Hide
Satoru Yoshida added a comment -

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

Show
Satoru Yoshida added a comment - I mistook in the discription. I correct in following. ^\p{Ll}\p{Lu} is more better.
Hide
Satoru Yoshida added a comment -

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

Show
Satoru Yoshida added a comment - 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."
Hide
Satoru Yoshida added a comment -

typo

Show
Satoru Yoshida added a comment - typo
Hide
Satoru Yoshida added a comment -

typo

Show
Satoru Yoshida added a comment - typo
Hide
Satoru Yoshida added a comment -

typo

Show
Satoru Yoshida added a comment - typo
Hide
Satoru Yoshida added a comment -

Code in my Description

Show
Satoru Yoshida added a comment - Code in my Description
Hide
Satoru Yoshida added a comment -

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

Show
Satoru Yoshida added a comment - I make test pattern for Zend_Filter_AlphaTest.php . I hope this will be useful.
Hide
Wil Sinclair added a comment -

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

Show
Wil Sinclair added a comment - What is the status of this issue and what action do we want to take on it?
Hide
Satoru Yoshida added a comment -

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

Show
Satoru Yoshida added a comment - I offered a solution in the file attachments, but it does not be discussed or applied.
Hide
Darby Felton added a comment -

Assigning to Satoru Yoshida. 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!

Show
Darby Felton added a comment - Assigning to Satoru Yoshida. 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!
Hide
Satoru Yoshida added a comment -

Resolved in SVN r8710

Show
Satoru Yoshida added a comment - Resolved in SVN r8710
Hide
Wil Sinclair added a comment -

Did this make it in to 1.5.0?

Show
Wil Sinclair added a comment - Did this make it in to 1.5.0?
Hide
Satoru Yoshida added a comment -

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.

Show
Satoru Yoshida added a comment - 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.
Hide
Darby Felton added a comment -

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

Show
Darby Felton added a comment - Yes, these changes made it into 1.5.0 with SVN r8732 (see Fisheye or All tab).

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
1d
Original Estimate - 1 day
Remaining:
1d
Remaining Estimate - 1 day
Logged:
Not Specified
Time Spent - Not Specified