[英]What the difference between Android String.compareTo() and sqlite3_stricmp()?
Is the result of Collections.sort(List) will be the same as SQLite.execute("SELECT text ... ORDER BY text ASC") on any sets of strings? 在任何一组字符串上,Collections.sort(List)的结果是否与SQLite.execute(“ SELECT text ... ORDER BY text ASC”)相同? ( https://www.sqlite.org/c3ref/stricmp.html )
( https://www.sqlite.org/c3ref/stricmp.html )
I'm expecting that not. 我期望不会。
The next question is - how to get the same result? 下一个问题是-如何获得相同的结果? Without own implementation of sqlite3_stricmp() in Android.
在Android中没有自己实现sqlite3_stricmp()的实现。
SQLite's default collations do not know about Unicode. SQLite的默认排序规则不了解Unicode。
Android adds collations LOCALIZED and UNICODE , which should use Java's rules. Android添加归类LOCALIZED和UNICODE ,应使用Java规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.