> - Database tables stay encoded using latin1
> - The new ZF2 functionality uses completely utf-8
> - Doctrine is initialized with utf-8:
> $entityManager->getEventManager()->addEventSubscriber(new
> \Doctrine\DBAL\Event\Listeners\MysqlSessionInit('utf8',
> 'utf8_unicode_ci'));
> 
> => the data, especially umlauts, seem to get correctly inserted and read
> from the database. Hopefully I can follow this approach not needing to
> write
> data mappers.

This should indeed be the proper approach. As long as the data in the tables
is encoded properly, MySQL can and will convert the data back and forth
depending on the session character set. I'm not sure how a UTF-8 to Latin1
mismatch will be handled though.

See also: http://dev.mysql.com/doc/refman/5.5/en/charset-connection.html

Regards,

Vincent de Lau
 vinc...@delau.nl


-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to