Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zend framework, mysql: How do I Set name utf-8 in application.ini

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

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

$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?

like image 481
Nicolas de Fontenay Avatar asked Apr 15 '11 11:04

Nicolas de Fontenay


1 Answers

It was:

resources.db.params.charset = "utf8"

(Added in the config file)

Thanks to Col. Shrapnel again.

like image 153
Nicolas de Fontenay Avatar answered Sep 22 '22 16:09

Nicolas de Fontenay