spspli spspli - 1 year ago 58
SQL Question

Is this a bug in sqlite?

I have following query for Czech language:

select Id,Name
from Account
where Name like '%Še%'

it will return me correct result. But if I change
in my query:

select Id,Name
from Account
where Name like '%še%'

It returns nothing. Is this a sqlite bug?

Answer Source


Important Note: 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. The ICU extension to SQLite includes an enhanced version of the LIKE operator that does case folding across all unicode characters.

So the solution to your problem would be to get an SQLite version with the ICU extension.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download