Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keysyms: Add sharp S upper case mapping exception #551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wismill
Copy link
Member

@wismill wismill commented Dec 9, 2024

The case mapping ssharp ß ↔ U1E9E ẞ was added in 13b30f4 but was broken:

  • For the lower case mapping it returned the keysym 0x10000df, which it an invalid Unicode keysym.
  • For the upper case mapping it returned the upper Unicode code point rather than the corresponding keysym.

It did accidentally enable the detection of alphabetic key type for the pair (ß, ẞ) though. However this detection was accidentally removed in 5c7c799 (v1.7) with an attempt to fix the wrong keysym case mapping. Finally both the lower case mapping and the key type detection were fixed for good when we implemented the complete Unicode simple case mappings and corresponding tests in e83d08d.

However, the upper case mapping ssharpU1E9E remained disabled. Indeed, ẞ is a relatively recent addition to Unicode (2008) and had no official recommendation, until recently. So while the lower mapping ẞ→ß exists in Unicode, its converse upper mapping does not. Yet since 2017 the Council for German Orthography (Rat für deutsche Rechtschreibung) recommends1 ẞ as the capitalization of ß.

Due to its stability policies, the Unicode Character Database (UCD) that we use to generate our keysym case mapping (via ICU) cannot update the simple case mapping of ß. Discussions are currently ongoing in the Unicode mailing list2 and CLDR3 about how to deal with the new recommended case mapping. However, the discussions are oriented on text-processing and compatibility mappings, while libxkbcommon is on a rather lower level.

It seems that the slow adoption of ẞ is partly due to the difficulty to type it. Since ẞ is used only for ALL CAPS casing, the expectation is to type it using CapsLock. While our detection of alphabetic key types works well4 for the pair (ß,ẞ), the internal capitalization currently does not work and is fixed by this commit.

Added the ß → ẞ upper mapping:

  • Added an exception in the generation script
  • Fixed tests
  • Added documentation of the exceptions in xkbcommon.h
  • Added/updated log entries

Fixes #550

Footnotes

  1. https://www.rechtschreibrat.com/regeln-und-woerterverzeichnis/

  2. https://corp.unicode.org/pipermail/unicode/2024-November/011162.html

  3. https://unicode-org.atlassian.net/browse/CLDR-17624

  4. Except libxkbcommon 1.7, see the second paragraph.

@wismill
Copy link
Member Author

wismill commented Dec 9, 2024

@whot you may want to check this since you added the case mapping ẞ↔ß in #127 (13b30f4).

@wismill wismill force-pushed the keysyms/großes-ß branch 2 times, most recently from c53e0a6 to a7a63e4 Compare December 9, 2024 12:14
The case mapping `ssharp` ß ↔ `U1E9E` ẞ was added in
13b30f4 but was broken:
- For the lower case mapping it returned the keysym `0x10000df`, which
  it an invalid Unicode keysym.
- For the upper case mapping it returned the upper Unicode code point
  rather than the corresponding keysym.

It did accidentally enable the detection of alphabetic key type for the
pair (ß, ẞ) though. However this detection was accidentally removed in
5c7c799 (v1.7) with an attempt to fix
the wrong keysym case mapping. Finally both the *lower* case mapping
and the key type detection were fixed for good when we implemented the
complete Unicode simple case mappings and corresponding tests in
e83d08d.

However, the *upper* case mapping `ssharp` → `U1E9E` remained disabled.
Indeed, ẞ is a relatively recent addition to Unicode (2008) and had no
official recommendation, until recently. So while the lower mapping ẞ→ß
exists in Unicode, its converse upper mapping does not. Yet since 2017
the Council for German Orthography (Rat für deutsche Rechtschreibung)
recommends[^1] ẞ as the capitalization of ß.

Due to its stability policies, the Unicode Character Database (UCD)
that we use to generate our keysym case mapping (via ICU) cannot update
the simple case mapping of ß. Discussions are currently ongoing in the
Unicode mailing list[^2] and CLDR[^3] about how to deal with the new
recommended case mapping. However, the discussions are oriented on
text-processing and compatibility mappings, while libxkbcommon is
on a rather lower level.

It seems that the slow adoption of ẞ is partly due to the difficulty
to type it. Since ẞ is used only for ALL CAPS casing, the expectation
is to type it using CapsLock. While our detection of alphabetic key
types works well[^4] for the pair (ß,ẞ), the *internal capitalization*
currently does not work and is fixed by this commit.

Added the ß → ẞ upper mapping:
- Added an exception in the generation script
- Fixed tests
- Added documentation of the exceptions in `xkbcommon.h`
- Added/updated log entries

[^1]: https://www.rechtschreibrat.com/regeln-und-woerterverzeichnis/
[^2]: https://corp.unicode.org/pipermail/unicode/2024-November/011162.html
[^3]: https://unicode-org.atlassian.net/browse/CLDR-17624
[^4]: Except libxkbcommon 1.7, see the second paragraph.
@wismill wismill force-pushed the keysyms/großes-ß branch from a7a63e4 to 621ddfc Compare December 9, 2024 12:48
@wismill
Copy link
Member Author

wismill commented Dec 9, 2024

It took me a while to properly remember and assess the consequences of 13b30f4 and 5c7c799. I hope the commit message provides now sufficiently information.

@wismill
Copy link
Member Author

wismill commented Dec 9, 2024

FYI: I filed a fix for libX11 too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ß should uppercase to ẞ
1 participant