We only have to worry about characters where the JavaScript and Ruby implementation of the conversion into lowercase differs. Not the other way around.
There is no rule how the German lowercase letter “ß” is converted into uppercase. It could be “SS”, “SZ” or even the new uppercase letter “ẞ” (yeah, there’s a subtle difference). Reversing that process is only possible for “ẞ” and that works correctly in Ruby and JavaScript.
I think we should do the following:
- Merge @sam’s workaround to fix the immediate issue
- Remove
LOWER(username)from SQL queries, because it’s just a bad™ thing to do (e.g. missing Unicode normalization) - Hope that Ruby fixes the underlying issue
- Long term: Think about adding user IDs to routes. I guess the hardest part will be figuring out how to handle quotes and mentions.