[FLOW3-general] German 'Umlaute' - UTF8 - Doctrine 2
Regine Rosewich
regine.rosewich at hoellenberg.biz
Mon Apr 25 15:28:55 CEST 2011
Hi Folks,
from the beginning with FLOW3 I squeamishly looked for having everything
properly utf-8ed. Nevertheless MySQL fields containing German Umlaute
(ä,ö,ü etc.) either threw errors when using ExtDirect-Request for the
Front-/Backend or werent readable when using the Fluid Front-/Backend. The
only way I found to get that problem solved was to change the
\F3\Resources\PHP\Doctrine\DBAL\Driver\PDOMySQL\Driver.php in the following
way.
/**
* Attempts to establish a connection with the underlying driver.
*
* @param array $params
* @param string $username
* @param string $password
* @param array $driverOptions
* @return Doctrine\DBAL\Driver\Connection
*/
public function connect(array $params, $username = null, $password =
null, array $driverOptions = array())
{
$conn = new \Doctrine\DBAL\Driver\PDOConnection(
$this->_constructPdoDsn($params),
$username,
$password,
$driverOptions
);
$conn->exec('SET NAMES "UTF8"');
return $conn;
}
This seems a little bit too brute-force to me. So I would like to know,
whether there is a more simple to force the database connection to be UTF-8
like configuration yamls or something like that.
Regine Rosewich
More information about the FLOW3-general
mailing list