I have a list of words and you want to find which ones already exist in the database.
Instead of doing dozens of SQL queries, I decided to use "SELECT wordFROM tableWHERE wordIN (array_of_words)" and then execute the result.
The problem is sorting the database.
http://www.collation-charts.org/mysql60/mysql604.utf8_general_ci.european.html
There are many different characters that MySQL treats as one and the same. However, in Ruby, string1 will not equal string2.
For example: if the word "šuo", the database can also return "suo" if it is found (and this is normal), but when I want to check if something is found "šuo", Ruby, of course, returns false (šuo ! = suo).
So, is there a way to compare two strings in Ruby in terms of the same sorting?
source
share