Re: [IndexedDB] Spec changes for international language support

FWIW, this maybe would have been better off as its own thread.  :-)

On Thu, Mar 17, 2011 at 3:37 PM, Pablo Castro <>wrote:

> From: Jonas Sicking []
> Sent: Tuesday, March 08, 2011 1:11 PM
> >> All in all, is there anything preventing adding the API Pablo suggests
> >> in this thread to the IndexedDB spec drafts?
> I wanted to propose a couple of specific tweaks to the initial proposal and
> then unless I hear pushback start editing this into the spec.
> From reading the details on this thread I'm starting to realize that
> per-database collations won't do it. What did it for me was the example that
> has a fuzzier matching mode (case/accent insensitive). This is exactly the
> kind of index I would want to sort people's names in my address book, but
> most likely not the index I'll want to use for my primary key.
> Refactoring the API to accommodate for this would mean to move the
> setCollation() method and the collation property to the object store and
> index objects. If we were willing to live without the ability to change them
> we could take collation as one of the optional parameters to
> createObjectStore()/createIndex() and reduce a bit of surface area...I don't
> have a strong preference there. In any case both would use BCP47 names as
> discussed in this thread (as Jonas pointed out, implementations can also do
> their thing as long as they don't interfere with BCP47).

I'm fine with this.  Another (I believe) related use case I ran into today
is wanting collation to be case insensitive.

> Another piece of feedback I heard consistently as I discussed this with
> various folks at Microsoft is the need to be able to pick up what the UA
> would consider the collation that's most appropriate for the user
> environment (derived from settings, page language or whatever). We could
> support this by introducing a special value that  you can pass to
> setCollation that indicates "pick whatever is the right for the
> environment's language right now". Given that there is no other way for
> people to discover the user preference on this, I think this is pretty
> important.

This seems useful even outside of the context of IndexedDB.  It should
probably be added to some other spec.  I'm fine adding it to ours for now
and adding an "issue" along with it.  But if so, please do shop it around.


Received on Friday, 18 March 2011 02:01:26 UTC