font utf8 error

Hi all How to config utf8

return new \Phalcon\Config(array(
  'database' => array(
      'adapter'     => 'Mysql',
      'host'        => '127.0.0.1',
      'username'    => 'root',
      'password'    => '[email protected]',
      'dbname'      => 'vokuro',
      'options' => array(
          PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
          )

and html <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> but errors ,when save in database https://dl.dropboxusercontent.com/u/109046499/Selection%5019.png



36.5k
edited Mar '14

I slove problem above

$di->set('db', function() use ($config) {
    return new DbAdapter(array(
        'host' => $config->database->host,
        'username' => $config->database->username,
        'password' => $config->database->password,
        'dbname' => $config->database->dbname,
        'charset'=> 'utf8'
    ));
});

Glad you got it working :)