Case insensitive criteria sorting

To create a criteria for search I do this :

$criteria = new EMongoCriteria();


This search for result and sort them by name. But unfortunately, it doesn’t insensitively sort the result ie word begins with letter “B” will appears before letter “a” because the ASCII code “B” is smaller than “a”.

Please help me to find a solution.

change your table charset to utf8_general_ci ?

It appears that this is a limitation with MongoDB:

One work-around suggested by the MongoDB supporters is to use an extra duplicated field, with all inserts to that field using .toLower()

Messy I know but perhaps it’s been fixed now?