Zend framework, mysql: How to set utf-8 name in application.ini

I have a zend application currently not displaying utf-8 special characters.

I need to use the utf-8 command set name for my mysql connection. Colonel Shrapnel hinted to me:

$params = array(
    'host' => 'localhost',
    'username' => 'username',
    'password' => 'password',
    'dbname' => 'dbname',
    'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;');
);

How do i get

'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;');

in my application.ini application?

+5
source share
2 answers

It was:

resources.db.params.charset = "utf8"

(added to configuration file)

Thanks to Colonel Shrapnel again.

+9
source

Try:

database.params.driver_options.PDO::MYSQL_ATTR_INIT_COMMAND=SET NAMES UTF8;
0
source

All Articles