这是一个简单的问题,但我无法单独解决它,因为我不太熟悉 SQL。
你们中的大多数人可能已经知道这一点,德语中有元音变音字母,例如“ä,Ö,Ü”,小写字母为“ä,ö,ü”。
我正在使用 sqlite 数据库,通过 Firefox 插件“SQLiteManager”访问它。
我的选择语句如下所示:
SELECT * FROM Projects WHERE Token LIKE '%ä%'
Firefox 插件和 .NET 的 SQLite 库都返回错误的输出。它们不仅返回带有小写“ä”的条目,还返回带有大写“ä”的条目。
你们知道解决这个问题的简单方法吗?
最佳答案
SQLite only understands upper/lower case for ASCII characters by default. The LIKE operator is case sensitive by default for unicode characters that are beyond the ASCII range.
但是:
The ICU extension to SQLite includes an enhanced version of the LIKE operator that does case folding across all unicode characters.
关于SQLite 选择带有变音符号的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34728273/