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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -