Tag Archives: collation

Doctrine use same collation on all tables (even plugins)

It really annoys me when I set my schema collate to utf8_general_ci but plugin tables are created as latin1_swedish_ci.

Solution?

Create the following method on your ProjectConfiguration.class.php

1
2
3
4
5
6
7
8
9
class ProjectConfiguration extends sfProjectConfiguration
{
    public function configureDoctrine(Doctrine_Manager $manager)
    {
        $manager->setCollate('utf8_general_ci');
        $manager->setCharset('utf8');

    }
}

Props to: http://www.prettyscripts.com/framework/symfony/symfony-and-doctrine-default-table-collation-a-better-solution