On Tue, 2007-05-08 at 10:45 +0700, Kirill wrote:
> Good day,
>
> SQLite version 3.3.17
> Enter ".help" for instructions
> sqlite> create table tbl1(t1 varchar(10));
> sqlite> insert into tbl1 values('софт'); - lowChar
> sqlite> insert into tbl1 values('СОФТ'); - upChar
> sqlite> select * from tbl1;
> софт
> СОФТ
> sqlite> select * from tbl1 where t1 like '%оф%'; - lowChar
> софт - lowChar
>
> :(
>
> what do?:
>
> sqlite> select * from tbl1 where t1 like '%оф%'; - lowChar
> софт - lowChar
> СОФТ - upChar
>
By default, SQLite only knows about the upper and lower case
equivalents for ASCII characters. You can override the built-in
LIKE operator with an external (possibly unicode aware) version
by overriding the like(X,Y) and like(X,Y,E) scalar functions
as described here:
http://www.sqlite.org/lang_expr.html
There is some ***UNTESTED*** code for an SQLite extension to
do this using the ICU library at:
http://www.sqlite.org/cvstrac/fileview?f=sqlite/ext/icu/icu.c
You could use this directly, or as an example to develop your own
LIKE function. If you do use it and find bugs, please report them
here or in cvstrac.
Dan.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------