I need to perform a SELECT queries that are insensitive to case and accents. For demo purposes, I create a table like that:
create table table
(
column tex
You will need to either create some user function, or override (i.e. replace) the default implementation of the like() functions. The reason is that the LIKE
operator in sqlite doesn't support non-ASCII case-insensitiveness:
SQLite only understands upper/lower case for ASCII characters by default. The LIKE operator is case sensitive by default for unicode characters that are beyond the ASCII range. For example, the expression 'a' LIKE 'A' is TRUE but 'æ' LIKE 'Æ' is FALSE.
This makes sense otherwise sqlite would need to support different cultures since case varies from one to the other. An example is the capital i in Turkey which is not I but a dotted İ, and the lower-case of I is a dot-less ı. Embedding all this culture information in sqlite would be very burdensome (i.e. it would increase sqlite object code).