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.