php - Symfony Query Builder: string with special characters -
i've done simple query:
$users = $this->em->getrepository('appbundle:users')->createquerybuilder('u') ->select('u.name') ->getquery() ->getresult();
in table have names non-ascii characters 'stéphane' or 'aurélien'.
when output names, have this:
["name"]=> string(17) "aurĂŠlien"
or
["name"]=> string(16) "stĂŠphane"
how can have correct utf-8 characters ?
make sure database's & table's collation utf8_unicode_ci & if it's different change utf8_unicode_ci
here can see effect of collation
Comments
Post a Comment