Subject: [drinks] Finishing the documents... (ad "case insensitivity")

From: Alexander Mayrhofer <[email-masked]>
Date: Tue, 11 Dec 2012 22:30:51 +0000

All,

both our two remaining documents have completed WGLC since quite some time, and the design team has addressed comments that came in during WGLC in the last revisions of the document.

The only open issue as far as i'm aware is around the case-sensitivity of Object Key Types (Section 5.2). The original text in -02 of the framework draft was:

   "Name" attributes that are used as components of object key types
   MUST be treated case insensitive.

One of the comments received during WGLC (by Andrew Sullivan) was that this would need lots more detail in order to specify what "case insensitive" actually means. I took the ticket to come up with more precise text in order to address this comment, and researched the Unicode standard. My proposal that went into -03 of the document looked like this:

   "Name" attributes that are used as components of object key types

   MUST be treated case insensitive, more specifically, comparison

   operations MUST use the toNFKC_Casefold() function, as specified in

   Section 3.13<http://tools.ietf.org/html/draft-ietf-drinks-spp-framework-03#section-3.13> of [reference to Unicode 6.1]

There were concerns within the design team that particularly the introduction of NFKC operations into the framework could have implications on implementations, and it was agreed that this issue would be rehashed after -03 has been posted. Again, my ticket, i've continued to research Unicode documents, as well as tried to find out what "case insensitive" actually means in typical database systems and programming languages. I don't think that reverting to the original "short" text solves the underlying problem. Therefore, my proposal is to drop the NFKC operations part of the requirement above, but still stick with a well defined Unicode Operation, namely the Default Case Folding "toCaseFold()". Proposed text is as follows:

   "Name" attributes that are used as components of object key types

   MUST be treated case insensitive, more specifically, comparison

   operations MUST use the Unicode Default Case Folding toCasefold()

   operation, as specified in Section 3.13<http://tools.ietf.org/html/draft-ietf-drinks-spp-framework-03#section-3.13> of [reference to Unicode 6.1]

I think that this fulfills the requirement of having a well-defined meaning of "case insensitive", avoids normalization logic which could lead to unexpected matching of identifiers. I understand that the  toCaseFold() operation is a very basic Unicode operation, and hence  should be available in almost any implementation of Unicode. I would appreciate if someone has detailed insight into the implementation details in various languages, and specifically whether/which database systems support such operations (Because of lack of publicly accessible documents about the SQL Standard, i couldn't verify whether or not SQL LOWER() etc. functions use Unicode operations, or something different).

Any comments about the proposal above?

Alex