[PR #18285] Fix clustering of gc=Cf, GCB=CN codepoints #31497

Open
opened 2026-01-31 09:47:40 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/18285

State: closed
Merged: Yes


  • Previously we would mark all gc=Cf (Control, format) codepoints
    as zero-width, but that ignores that the majority of them are also
    GCB=CN (Control = does not join), which meant we ended up with
    zero-width grapheme clusters. Those cannot exist under a terminal.
    So, this PR makes all gc=Cf, GCB=CN codepoints zero-width, but also
    treats them as Extender codepoints, which mirrors wcswidth.
  • This PR also updates the tables to Unicode 16.0.
  • Finally, there's a minor code cleanup of the generator.

Closes #18267

Validation Steps Performed

  • Unit tests ✅
  • Thai does not have random gaps anymore due to ZWSP ✅
**Original Pull Request:** https://github.com/microsoft/terminal/pull/18285 **State:** closed **Merged:** Yes --- * Previously we would mark all gc=Cf (Control, format) codepoints as zero-width, but that ignores that the majority of them are also GCB=CN (Control = does not join), which meant we ended up with zero-width grapheme clusters. Those cannot exist under a terminal. So, this PR makes all gc=Cf, GCB=CN codepoints zero-width, but also treats them as Extender codepoints, which mirrors `wcswidth`. * This PR also updates the tables to Unicode 16.0. * Finally, there's a minor code cleanup of the generator. Closes #18267 ## Validation Steps Performed * Unit tests ✅ * Thai does not have random gaps anymore due to ZWSP ✅
claunia added the pull-request label 2026-01-31 09:47:40 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31497