⛔️ This extension is deprecated. Use text instead.
The sqlean-unicode
extension implements case-insensitive string comparison for Unicode strings. Has no external dependencies (like libicu).
Reference • Acknowledgements • Installation and usage
Provides the following unicode features:
upper()
andlower()
functions to normalize case.like()
function andLIKE
operator with case-independent matching.unaccent()
function to normalize strings by removing accents.
Tries to override the default NOCASE case-insensitive collation sequence to support UTF-8 characters (available in SQLite CLI and C API only).
sqlite> select upper('привет');
ПРИВЕТ
sqlite> select nupper('привет');
ПРИВЕТ
nupper()
is an alias for upper()
in case the latter is already overridden by some other extension.
sqlite> select lower('ПРИВЕТ');
привет
sqlite> select nlower('ПРИВЕТ');
привет
nlower()
is an alias for lower()
in case the latter is already overridden by some other extension.
The pattern in like()
function goes first:
sqlite> select like('пРиВ_Т', 'привет');
1
The pattern in LIKE
operator goes second:
sqlite> select 'привет' like 'пРиВ_Т';
1
sqlite> select unaccent('hôtel');
hotel
Adapted from sqlite3_unicode.
Before:
sqlite> select upper('hello');
HELLO
sqlite> select upper('привет');
привет
After:
sqlite> .load ./unicode
sqlite> select upper('hello');
HELLO
sqlite> select upper('привет');
ПРИВЕТ
See How to install an extension for usage with IDE, Python, etc.
↓ Download the extension.
⛱ Explore other extensions.
★ Subscribe to stay on top of new features.