Created
August 4, 2019 18:54
-
-
Save burningTyger/073ee3d81c5629fa9373edcdedca4645 to your computer and use it in GitHub Desktop.
sqlite with icu support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in order to have icu support in sqlite you need to enable it via compile options. | |
# install the icu dev package on your system and download the source files from sqlite | |
# unpack and enter the source dir | |
# on a mac I had to do this to compile: | |
brew install icu4c | |
CFLAGS=`-I/usr/local/opt/icu4c/include -O3 -DSQLITE_ENABLE_ICU` CPPFLAGS=`icu-config --cppflags` LDFLAGS=`-L/usr/local/opt/icu4c/lib icu-config --ldflags` ./configure | |
# I had to add the path to the icu libs | |
# on linux the paths were added automatically to path | |
# so this would suffice on . ubuntu and arch where I also compiled: | |
CFLAGS='-O3 -DSQLITE_ENABLE_ICU' CPPFLAGS='icu-config --cppflags' LDFLAGS='icu-config --ldflags' ./configure | |
# then continue with | |
make | |
This will build your sqlite for you | |
# I wanted to use better-sqlite3 with icu so I had to use this: | |
npm i --sqlite3=/path/to/src/ |
good question. I recently googled this because I was thinking about updating too. There is the following repository for this: https://github.com/nalgeon/sqlean/blob/main/docs/unicode.md
I think it does exactly what icu4sqlite did before. I used it for comparing strings with local character sets.
fotgot to @grugani you :)
Thanks :)
Sadly I need it to customize sqlite build for Android. I can't load an extension at runtime.
I'm not sure, but seems ICU extension is the only way
ok, feel free to update your findings here. It's always useful to have as much information as possible on this topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, there are some changes after 4 years ?
icu-config is deprecated and is not installed in last ubuntu version.