unicode-org / unicodetools

home of unicodetools and https://util.unicode.org JSPs
https://util.unicode.org
Other
52 stars 41 forks source link

Add an invariant check for Titlecase_Mapping #555

Open eggrobin opened 1 year ago

eggrobin commented 1 year ago

Something that would have caught this: https://github.com/unicode-org/unicodetools/pull/554#issuecomment-1745562305.

One possibility is that the Titlecase_Mapping is not to itself except for Lt and Georgian Ll; maybe we can be more specific?

markusicu commented 1 year ago

If it's not gc=Lt and the decomposition mapping is to a sequence of cased letters, then it should have a Titlecase_Mapping?

markusicu commented 1 year ago

For most characters, uppercase = titlecase. That alone should have helped with #554.