Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S specifications
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • terminal-wg
  • specifications
  • Issues
  • #9
Closed
Open
Issue created Jan 30, 2019 by George Nachman@gnachmanOwner

Double-width characters in Unicode 9+

Unicode Variation Selector 16 (U+FE0F) makes the character it combines with double-width. This is the first time that a combining mark changes the width of the character it combines with; for all other characters, you can consult east-asian-widths.txt and determine the width from it.

wcwidth() is incapable of dealing with this properly because it only looks at the base character. Consequently, almost all applications won't handle grapheme clusters with this codepoint correctly. Terminal emulators find themselves between the trenches.

For reference, the iTerm2 issue: https://gitlab.com/gnachman/iterm2/issues/7239

And fish shell: https://github.com/fish-shell/fish-shell/issues/5583

Fish uses this library to generate code to determine width: https://github.com/ridiculousfish/widecharwidth

It adds the additional wrinkle that all Emoji are treated as double-width in Unicode 9+, even if east-asian-width does not call for it.

Since Unicode has made a bit of a mess here it would be helpful to come to an agreement on how best to compute character width and how to handle Variation Selector 16. Better behaved terminal emulators beget better apps.

Assignee
Assign to
Time tracking