>You are correct that LIKE and GLOB only work for 7-bit ascii >strings. If you need a LIKE and GLOB that work with Unicode, >you can register alternative LIKE and GLOB functions using >the sqlite3_create_function() API.
Yes, I know it can be done that way. BTW, I'm not using Unicode. :) I meant "conceptually" comparing text and matching a string is quite the same. Why involving new user functions to match a string (and duplicating code) when we have collations wich compare text? So intead of passing the string to lower case (through the macro in utf.c), I guessed it could use the defined collation function (if any or the default). With all this, it would be easy to perform case insensitive as well as case sensitive LIKE and GLOB function calls just substituting the collation function int the sql statement. BTW. Another workaround would be registering and using a function but without replacing the LIKE and GLOB functions like: select * from foo where col1 like myfunction (somevalue) I think it would work.