Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-355

Queries silently ignore Collation Locale

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • 2.7.0
    • 2.6.0, 2.7.0
    • LiteCore
    • Security Level: Public
    • None
    • CBL Sprint 5
    • 3

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jimb Jim Borden
            blake.meike Blake Meike
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty