这个问题与此处提出的问题有关,但我无法找到答案。
我已经在 SQLite 中启用了 ICU 支持并重建了 Db 引擎,现在该怎么办?我通过执行 SELECT UPPER("ä") 检查了 ICU 支持,结果为 Ä。
这个问题与此处提出的问题有关,但我无法找到答案。
我已经在 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.