ICU extension

334 views
Skip to first unread message

DmitriyD

unread,
Oct 3, 2012, 3:48:10 PM10/3/12
to sqlc...@googlegroups.com
Hi everybody,
I am developing an application for android using SQL Cipher.
I`ve faced with the problem that LIKE is case sensitive when searching in Russian language.
While googling I found that I can use "ICU" extension for SQLite.
Is it possible to use it in SQL Cipher? And what steps do I need for that? I am developing on Windows OS.

Thank you in advance.

Nick Parker

unread,
Oct 3, 2012, 4:00:01 PM10/3/12
to sqlc...@googlegroups.com
Hi DmitriyD,

SQLCipher for Android depends on localization data from the ICU project as well. You can infact custom the dat file that is used. The ICU project provides a ICU data library customizer here:

http://apps.icu-project.org/datacustom/ICUData46.html

Nick Parker

DmitriyD

unread,
Oct 4, 2012, 3:01:19 PM10/4/12
to sqlc...@googlegroups.com
Hi Nick,

I include full (with data for all languages) icudt46l.zip file to assets of my project. The problem still exists.

In the project I have not-encripted database which is created on PC. I extract it from assets and export it to database created with SQLCipher. I use sqlcipher_export function.
Maybe this is the reason why LIKE works bad, is it?
Maybe database should be utf-16? 

SQL table:
CREATE TABLE if not exists ActionType (_id INTEGER PRIMARY KEY ASC AUTOINCREMENT,  Title TEXT);

SQL query: 
"select _id, Title from ActionType where title like '%" + title + "%' COLLATE LOCALIZED  "

четверг, 4 октября 2012 г., 0:00:05 UTC+4 пользователь Nick Parker написал:

Nick Parker

unread,
Oct 4, 2012, 5:46:41 PM10/4/12
to sqlc...@googlegroups.com
Hi DmitriyD,

Could you share the exception and error message you receive when you
execute that statement?
--

Nick Parker

Brendan Duddridge

unread,
Oct 6, 2012, 10:39:12 PM10/6/12
to sqlc...@googlegroups.com
Speaking of ICU, does anyone here know how to compile SQLCipher for iOS including ICU?

Thanks,

Brendan

Billy Gray

unread,
Oct 8, 2012, 10:19:39 AM10/8/12
to sqlc...@googlegroups.com
Hi Brendan, 

I haven't tried it, but a cursory search does show some information out there on building what's called the SQLite ICU Extension. The basic directions are for building a shared library that you then `.load` after :


If you want a static library (e.g. libicuuc.a) for the ICUC extension, so you can include it in an iOS app, it looks like there's more work involved. There's lots of search results that turn up, but I couldn't tell you what's authoritative. This is a bit hard to follow, but might be helpful, haven't verified any of it:


Best of luck,
Billy
--
Team Zetetic
http://zetetic.net
Reply all
Reply to author
Forward
0 new messages