On 10/12/16 1:56 PM, William Fisher wrote:
Should enforcing a string using PRECIS be idempotent?

As far as I know, that was not a design criterion for PRECIS. Naturally, it might be a desirable property nonetheless.

If I apply the
enforce operation to a string twice, should I get the same result as
applying it just once?

The nickname profile is NOT idempotent for some inputs.

1. Certain characters are NFKC normalized to sequences with ASCII
spaces. This can lead to nicknames that begin with a space or contain
adjacent interior spaces that are removed if you apply the nickname
profile again.

  U+00A8  =>  U+0020 U+0308  =>  U+0308

That's a good example.

One could argue that the leading/trailing space and adjacent interior space rules are application-specific and don't really belong in the nickname profile (indeed, I seem to recall a message to the WG about that years ago). I've been on the fence about that several times.

 2. Some characters can be further case mapped after NFKC normalization.

  U+1F11  => (K) => (k)

It's not clear to me that U+1F11 has the problem you describe; perhaps could you sketch it out further?

I also noticed that the RFC 7700 has case-mapping defined only when
comparing nicknames.  I thought this was confusing. I didn't understand
why username is split into two profiles (CasePreserved and CaseMapped),
but nickname is not.

We try really hard not to multiply profiles beyond necessity. In this instance, we deemed acceptable not to apply the case mapping rule for enforcement (e.g., "StPeter" is a fine nickname) but would like to avoid nicknames in the same address space (e.g., a chatroom) that differ only by case because that would be confusing (e.g., "StPeter" and "stpeter"). As you suggest, we could have accomplished the same result by defining two separate profiles.

If not all PRECIS profiles are idempotent, it would help to mention this
in the IANA Profile registry, e.g.

   Idempotent:  No.

As an implementer, I would prefer profiles that are idempotent.

Thanks for your input. Personally I will think about it further and post again after I do so.


precis mailing list

Reply via email to