[email protected] wrote: > So I defined > > #define SQLITE_ENABLE_ICU > > Then I try call to create collation: > > int iRetVal = > sqlite3_create_collation(m_sqliteDb,pstrDbName,SQLITE_UTF8,NULL,sqliteLocaleAwareCompare);
You are implementing your own custom collation. What does this have to do with ICU? > But this sqliteLocaleAwareCompare never gets called when query is executed to > database Does your query mention the collation? The second parameter of sqlite3_create_collation - pstrDbName in your example - is the collation name. Let's say it's "MYCOLL". Run a query that looks like this: select * from MyTable where SomeField = 'xyz' collate MYCOLL; > Then I was wondering that should I do that create_collation to this following > method defined in sqlite3.c but that never succeeded > static int icuLikeCompare( > const uint8_t *zPattern, /* LIKE pattern */ > const uint8_t *zString, /* The UTF-8 string to compare against */ > const UChar32 uEsc /* The escape character */ This is not a collation, this function is for implementing LIKE operator. > Now I just wonder which way to proceed ? That rather depends on what you are trying to achieve. It's not clear to me. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

