Hello!

I'm try to do this in tcl with SQLIte 3.6.7:

proc nocase_compare {a b} {
     return [string compare [string tolower $a] [string tolower $b]]
 }
db collate NOCASE nocase_compare

CREATE TABLE test (
  name TEXT --COLLATE NOCASE
);
insert into test values ('Привет!');
insert into test values ('Ё-моё');
insert into test values ('привет');
insert into test values ('ё-прст');
insert into test values ('ага!');
insert into test values ('ё-моё');


Sorting is wrong:
select * from test order by name collate NOCASE;
"Привет!"
"Ё-моё"
"привет"
"ё-прст"
"ага!"
"ё-моё"

And result is equal to

select * from test;
"Привет!"
"Ё-моё"
"привет"
"ё-прст"
"ага!"
"ё-моё"


Query "select * from test order by name;" must to return this:
ага!
ё-моё
Ё-моё
ё-прст
привет
Привет!


Best regards, Alexey.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to