set global encoding in Zend Framework -
my bootstrap sets encoding views:
protected function _initview () { $view = new zend_view(); // snip... $view->setencoding('utf-8'); // snip... return $view; }
however, not set encoding form validators. stringlength
uses default encoding (i'm not sure is) , counts diacritics 2 characters.
i know can set 'encoding' => 'utf-8'
option when creating validator, it's kind of pesky update validators across entire (huge) application. there way set encoding validators @ same time?
in zf 1.1x stringlength
validator uses iconv_strlen
:
int iconv_strlen(string $str [, string $charset = ini_set("iconv.internal_encoding")])
so 1 thing try call ini_set
(or iconv_set_encoding('internal_encoding', $encoding);
).
Comments
Post a Comment