by prettyscripts on 2010-03-08 11:09:13
as of symfony 1.4 and if working with doctrine, there are still problem setting default and correct table encoding and collations with symfony doctrine:build task.
i have previously posted 2 solution. the 1st involves hacking the core code, which needs to be done with every symfony upgrade. the 2nd involves adding options to set default encoding and collation in schema.yml, which has to be done on every table! with the latter, tables created by plugins won't have the correct encoding. you will ended up with a database of tables with mixed collations.
i believe i have found a better solution. add a function to 'config/ProjectConfiguration.class.php':
PHP:
public function configureDoctrine(Doctrine_Manager $manager) { | |
$manager->setCollate('utf8_unicode_ci'); | |
$manager->setCharset('utf8'); | |
} |