We\'re building a Symfony2 app that\'s using an Oracle database. All the data in the DB is encoded as WE8ISO8859P15 (iso-8859-1), and all the website is encoded as utf-8.
I solve a similar problem with a MSSQL instance for convert from utf8 to latin1 and viceversa. I do the following step:
config.yml
too)This his the code:
DBAL CUSTOM TYPE
BUNDLE INITIALISATION
container->get('doctrine.orm.em_my_sqlserver_entity_manager');
$conn = $em->getConnection();
$conn->getDatabasePlatform()->registerDoctrineTypeMapping('Utf8String', 'utf8string');
}
}
}
AN EXAMPLE MAPPED ENTITY
Hope this help and hoping you find a better solutions too!!!