wtorek, 5 listopada 2013

Doctrine 2 Zend Framework 2 with UTF-8

It's good solution for problem with Doctrine 2 and coding UTF-8.
This configuration set UTF-8 for DB.
This config: YourProjectPath/config/autoload/doctrine.local.php

return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'driverClass' =>'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'host',
'port' => '3306',
'user' => 'username',
'password' => 'password',
'dbname' => 'dbname',
'charset' => 'utf8',
'driverOptions' => array(
1002=>'SET NAMES utf8'
))
))));

Brak komentarzy:

Prześlij komentarz