I’ve a search that works if no accents are on vowels, that’s good for english.
Dim stmt As SQLitePreparedStatement
s = “%” + s + “%”
stmt = SQLitePreparedStatement(MyDataBase.Prepare(“SELECT * FROM Frases WHERE frase like ?”))
etc.
On other languages if user writes “do” all records that contains “do” are found but not records with “d”, or "“d” or any accent on vowel
I read somewhere that I should alter database like:
you must add the collation “modern_spanish” to your database, and I also would like to know how to do it (for french)
the sqlite in xojo does not support local accents, they have to change the sqlite compilation
and it would add 20MB to the applications and they don’t want to do it for now.
ok for english people, but problems for the rest of the world…
<https://xojo.com/issue/26859>
you could try “select * from frases where frase like ? collate nocase”, it may work.
but sorting is not possible with xojo sqlite.
the only way to do it today, is to store an ascii version of the text you’re searching for
you store a field in the database with the complete word ex: “tourdi”
and another field without the accents : “etourdi”
and you make your search with the ascii field
it takes twice the space needed, but it works.
I used that Jean-Yves Pochez suggested, and added a field with the ascii version. That works.
I’ll try your suggestion but I think SQLite is not the same
collation is very specific to each database engine
each engine deals with it in a different way
and with sqlite, we simply cannot use it the international collations are not included in xojo plugin
see the feedback above.