On Mon, Dec 4, 2017 at 4:06 PM, Christian Schudt
<[email protected]> wrote:
> If a user wishes to create a username with U+212B (Angstrom sign), should an
> application reject it (because it’s disallowed) or allow it, because
> enforcement converts the character to a valid code point first?
I implemented enforcement based on the rules in RFC 8264 section 7.
The behavioral rules (IdentifierClass) are applied last.
>>> from precis_i18n import get_profile
>>> ic = get_profile('IdentifierClass')
>>> ic.enforce('\u212b')
Traceback (most recent call last):
...
UnicodeEncodeError: 'IdentifierClass' codec can't encode character
'\u212b' in position 0: DISALLOWED/has_compat
>>> un = get_profile('UsernameCasePreserved')
>>> un.enforce('\u212b')
'Å'
See also:
https://www.ietf.org/mail-archive/web/precis/current/msg01225.html
You're right that the references to preparation in RFC 8265 (sections
3.3.2, 3.4.2) are at odds with RFC 8264 and the mailing list.
-Bill
_______________________________________________
precis mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/precis