2
這個問題與詢問here的人有關,但我找不出答案。如何在SQLite中實現重音/變音不敏感搜索?
我已經在SQLite中啓用了ICU支持並重建了Db引擎,現在呢?我通過執行導致Ä的SELECT UPPER(「ä」)檢查了ICU支持。
這個問題與詢問here的人有關,但我找不出答案。如何在SQLite中實現重音/變音不敏感搜索?
我已經在SQLite中啓用了ICU支持並重建了Db引擎,現在呢?我通過執行導致Ä的SELECT UPPER(「ä」)檢查了ICU支持。
根據http://www.sqlite.org/faq.html#q18
(18)的Unicode字符不區分大小寫匹配不起作用。
The default configuration of SQLite only supports case-insensitive comparisons of ASCII
characters. The reason for this is that doing full Unicode case-insensitive comparisons
and case conversions requires tables and logic that would nearly double the size of the
SQLite library. The SQLite developers reason that any application that needs full Unicode
case support probably already has the necessary tables and functions and so SQLite should
not take up space to duplicate this ability.
Instead of providing full Unicode case support by default, SQLite provides the ability to
link against external Unicode comparison and conversion routines. The application can
overload the built-in NOCASE collating sequence (using sqlite3_create_collation()) and
the built-in like(), upper(), and lower() functions (using sqlite3_create_function()).
The SQLite source code includes an "ICU" extension that does these overloads. Or,
developers can write their own overloads based on their own Unicode-aware comparison
routines already contained within their project.
OP說他/她已經使用ICU擴展,它提供了那些過載。怎麼辦? – Alicia 2013-08-20 04:26:32