I have this query:
Location.where("lower(name) = ?",name.downcase)
Which works well, but when I tried it with Russian characters it seems to fail.
Location.where("lower(name) = ?","Серебрянный дождь".downcase)
This returns 0 results, where:
Location.where("name = ?","Серебрянный дождь".downcase)
returns 1 result (dropped the "lower(...)")
I'm not entirely sure what's going on (notice in ruby: "Серебрянный дождь".downcase = "Серебрянный дождь").
I could theoretically do "lower(...)" only from string that contain only A-Z characters, but that's too cumbersome than I'd like as I need this code to work in a lot of places..