Details
Description
The following code will do the wrong thing, on Android API <=23 and do so without warning:
Collation localeSvenska = Collation.unicode()
|
.locale("se")
|
.ignoreCase(false)
|
.ignoreAccents(false);
|
|
Query query = QueryBuilder.select(SelectResult.property("string"))
|
.from(DataSource.database(db))
|
.orderBy(Ordering.expression(Expression.property("string").collate(localeSvenska)));
|
It returns:
{"A", "Å", "B", "Z"}instead of
{"A", "B", "Z", "Å"}We should not simply ignore our what our API promises.
Attachments
Issue Links
- relates to
-
CBL-2679 "Info" API
-
- Closed
-
I didn't in any way mean to demean the CBL logging system or the work that has been put into them. I am simply saying that the mobile environment makes it really, really hard to see those excellent logs!
"context" is a term to which Jim Borden introduced me. It appears to be an object that Core passes to SQLite, and which SQLite then queries to get the Locale. I know only about half of what Jim tried to explain to me in an hour or so, last night. It is, apparently, the context that logs the warning. My hope is that, in addition to logging it, it could make that warning programatically accessible.