Comment 2 for bug 1435265

Revision history for this message
Kuo-tung Kao (jelly) (coding1314) wrote :

I tested the bug in sqlite3, postgresql and mysql. And I found the bug happened in mysql. the collation of string column is “utf8_general_ci” in mysql. the “_ci” means case insensitive. So “Test” equals “test”. If you want the string column which supports case sensitivity, it seems that the only answer is utf8_bin. But if you use utf8_bin, it will make another bug when you use “order by”. You can write the code like “order_by(asc(collate(name,’utf8_general_ci’)))”. But the way is ugly. ref: http://stackoverflow.com/questions/4558707/case-sensitive-collation-in-mysql https://gist.github.com/ya790206/78044353e09c7a312721