I
I
Ignatius Voronishchenko2015-11-12 14:40:00
Database
Ignatius Voronishchenko, 2015-11-12 14:40:00

How to build SQLite with ICU?

There is such a wonderful DBMS called SQLite . In the version of the compiled dll that is offered to download from the official site, there are problems with case insensitive LIKE and ORDER BY for unicode
: will be printed no matter what you do, no matter what lower() and upper() you use. The same with ORDER BY: when sorting by a column with Russian content, the result will be something like this:
AAA
BBB YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY The problem is solved by compiling the library with the
SQLITE_ENABLE_ICU option . This option enables the Internetional Components for Unicode extension
, the library of which must be taken from the corresponding site and also, in turn, compiled.
My problem is that I am not friends with MSVS and Linux and no matter how much effort I put in, I never managed to build this damn SQLite with ICU.
The most significant thing that I managed to google is a two-year-old topic on sql.ru , where they mock a newbie in a similar situation and a question on stackoverflow with an explanation for Linux. Unfortunately, neither link helped me.
In addition, there are already built dlls here , but there is SQLite 3.7.4, but I want something fresher.
Perhaps, who has SQLite 3.9+ with ICU included in the bins? Or can someone collect it and post it? Or share a link to detailed assembly instructions for windows?
Thanks for understanding

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Mirilaczvili, 2015-11-12
@Igo_V

For Windows can be built without ICU, using the Win API of

You can download the modified source code for version 3.8.3 and the assembled dll from the link.

Z
zed, 2015-11-12
@zedxxx

SQLite has a special API for registering its own string comparison function: Define New Collating Sequences

When SQLite compares two strings, it uses a collating sequence or collating function (two words for the same thing) to determine which string is greater or if the two strings are equal. SQLite has three built-in collating functions: BINARY, NOCASE, and RTRIM.
BINARY - Compares string data using memcmp(), regardless of text encoding.
NOCASE - The same as binary, except the 26 upper case characters of ASCII are folded to their lower case equivalents before the comparison is performed. Note that only ASCII characters are case folded. SQLite does not attempt to do full UTF case folding due to the size of the tables required.
RTRIM - The same as binary, except that trailing space characters are ignored.
An application can register additional collating functions using the sqlite3_create_collation() interface .

K
kronic, 2016-01-04
@kronic

Is collected under c# together with icu if interests.
If interested, I can collect dll under windows together with icu.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question