Hy,

my 5 cents, for Zend_Filter getAlpha on using german umlauts and polish characters:

public static function getAlpha($value)
{
return preg_replace('/[^[:alpha:]|"öäüßÖÄÜ?a;e;s'c'óz'n'?z."]/', '', $value);
}

And what about other languages

é, è, ê, ò, ó, ô for example

We must use a version which can handle also other than only
german or polish characters. Scandinavian, Spanish or French characters should also be recognised.

Btw:
Zend_Locale provides a list of used characters for a locale.

See the internal function :
Zend_Locale_Data::getContent($locale, 'characters');

So I would say getAlpha should only support english characters.
But if a locale is given the characterset from the locale is used.

So

getAlpha($value) - would only search 'a-z'

$locale = new Zend_Locale('de');
getAlpha($value,$locale); - would search 'a-z ä ö ü ß'

and so on.
I think this would be a better solution as the existing one :-)



my localized cent

Greetings
Thomas
(I18N Master :-) )

Reply via email to