I use Symfony 2.7 with Doctrine and I'm trying to use an existing database where I have columns name with non-ascii characters e.g. libellé (in French).
All goes well except when trying to build a DQL query using that name explicitely. I then get the error :
[Syntax Error] line 0, col 15: Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got '�'
with the query :
SELECT R.libellé, V.libellé
FROM IutFranceBundle:Regions R
INNER JOIN R.cheflieu V
ORDER BY R.libellé ASC
The only answer I found for this problem is to avoid using non-ascii chars in column names... I use the same database with PDO/MySQL queries, using non-ascii chars without any problem.
I dug a little in Doctrine code and found that the problem seemed to be in Lexer.php class, which uses inapropriate regex.
Thanks in advance if you can share a solution to this.