Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
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';
}
}
I mistook in the discription.
I correct in following.
^\p{Ll}\p{Lu} is more better.