I am developping a Zend application. The data in my database is encoded in \"utf8_unicode_ci\". I declared in my application.ini :
resources.view.encoding =
I had the same problem while using the Doctrine2 module in my Zend Framework 2 application. Explicitly setting the character set for my Doctrine2 module solved the issue...
Just add 'charset' => 'utf8'
to your doctrine connection parameters:
'params' => array(
'host' => 'localhost',
'port' => 'yourport',
'user' => 'username',
'password' => 'password',
'dbname' => 'yourdatabase',
'charset' => 'utf8',
)
Might also work for your normal database connection. Add 'charset=utf8'
to the connection string:
'db' => array(
'driver' => 'Pdo',
'dsn' => 'mysql:host=$localhost;dbname=$yourdatabase;charset=utf8',
'driver_options' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
)
),