Hi Pavel,
>I believe you need to show us your sql query. Maybe something in it >forces SQLite to use UTF-16 version of the function. Ummm, I don't kno where the problem is, but _any_ simple select will do (for me), e.g.: An UTF-8 base... CREATE TABLE "PaysISO" ( "Nom_Iso" CHAR(43), "Code_Iso" CHAR(2)); /* Data "PaysISO" */ insert into "PaysISO" values('AFGHANISTAN', 'AF'); insert into "PaysISO" values('AFRIQUE DU SUD', 'ZA'); insert into "PaysISO" values('ÅLAND, ÎLES', 'AX'); insert into "PaysISO" values('ALBANIE', 'AL'); insert into "PaysISO" values('ALGÉRIE', 'DZ'); insert into "PaysISO" values('ALLEMAGNE', 'DE'); insert into "PaysISO" values('ANDORRE', 'AD'); insert into "PaysISO" values('ANGOLA', 'AO'); insert into "PaysISO" values('ANGUILLA', 'AI'); insert into "PaysISO" values('ANTARCTIQUE', 'AQ'); insert into "PaysISO" values('ANTIGUA ET BARBUDA', 'AG'); insert into "PaysISO" values('ANTILLES NÉERLANDAISES', 'AN'); insert into "PaysISO" values('ARABIE SAOUDITE', 'SA'); insert into "PaysISO" values('ARGENTINE', 'AR'); insert into "PaysISO" values('ARMÉNIE', 'AM'); insert into "PaysISO" values('ARUBA', 'AW'); insert into "PaysISO" values('AUSTRALIE', 'AU'); insert into "PaysISO" values('AUTRICHE', 'AT'); ... select * from PaysISO where Nom_ISO like '%ile%'; RecNo Nom_Iso Code_Iso ----- ------------------------------------------ -------- 1 ÅLAND, ÎLES AX 2 CAÏMANES, ÎLES KY 3 CHRISTMAS, ÎLE CX 4 COCOS (KEELING), ÎLES CC 5 COOK, ÎLES CK 6 FALKLAND, ÎLES (MALVINAS) FK 7 FÉROÉ, ÎLES FO 8 GÉORGIE DU SUD ET LES ÎLES SANDWICH DU SUD GS 9 ÎLE DE MAN IM 10 ÎLES MINEURES ÉLOIGNÉES DES ÉTATS-UNIS UM 11 ÎLES VIERGES BRITANNIQUES VG 12 ÎLES VIERGES DES ÉTATS-UNIS VI 13 MARIANNES DU NORD, ÎLES MP 14 MARSHALL, ÎLES MH 15 NORFOLK, ÎLE NF 16 SALOMON, ÎLES SB 17 SVALBARD ET ÎLE JAN MAYEN SJ 18 TURKS ET CAÏQUES, ÎLES TC This is a Unicode (non-ICU) folded, unaccented LIKE: {"like", 2, SQLITE_UTF8, (void *) &likeInfoNorm, likeFunc8 }, {"like", 2, SQLITE_UTF16, (void *) &likeInfoNorm, likeFunc16 }, {"like", 3, SQLITE_UTF8, (void *) &likeInfoNorm, likeFunc8 }, {"like", 3, SQLITE_UTF16, (void *) &likeInfoNorm, likeFunc16 }, {"glob", 2, SQLITE_UTF8, (void *) &globInfo, likeFunc8 }, {"glob", 2, SQLITE_UTF16, (void *) &globInfo, likeFunc16 }, {"glob", 3, SQLITE_UTF8, (void *) &globInfo, likeFunc8 }, {"glob", 3, SQLITE_UTF16, (void *) &globInfo, likeFunc16 }, The same happens for GLOB with 2-arg (UTF-16 version invoked): select * from PaysISO where Nom_ISO glob '*ILE*'; (same output). But I just noticed that glob with 3 args invokes the UTF-8 version: select * from PaysISO where glob('*ILE*', Nom_ISO, '{'); (same output). While the 3-args like still calls the UTF-16 version: select * from PaysISO where like('%ile%', Nom_ISO, '{'); (same output). In all examples above, I've used either plain ASCII or "weirder" accented letters, to further test my code. Also doing this way shows that the native SQLite version is not doing anything. (When things get strange, you start looking behind your shoulders.) The VC++ debugger pops up each time and shows the caller is sqlite3.dll every time, so there is no man-in-the-middle attack against my poor extension. I have only v3.6.18 and no modified/recompiled sqlite3.dll here. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users