Some "Unicode nonspacing marks" introduce an additional space #17346

Closed
opened 2026-01-31 05:39:51 +00:00 by claunia · 3 comments
Owner

Originally created by @huangyxi on GitHub (Apr 27, 2022).

Windows Terminal version

1.12.10983.0

Windows build number

10.0.22000.652

Other Software

software independent
just paste some characters into the terminal

Steps to reproduce

Paste the following string into the terminal:

 = ∑y / n
 = y - 

I have tested the above steps in multiple shells (gitbash, cmd, pwsh, WSL),
with multiple fonts (Cascadia Code, Cascadia Mono, Consolas, Courier New, Lucida Console, Source Code Variable),
and all behavior is the same.

Expected Behavior

I searched that the Unicode characters U+0304 ◌̄ , U+0302 ◌̂ are belong to a category named "nonspacing mark".
From the name, I guess that the nonspacing mark itself should not takes up any space. And it means that an arbitrary normal character (e.g. a, b, c) combined with an arbitrary nonspacing mark (e.g. , ) should only take up one character wide.

Actual Behavior

Now an arbitrary normal character (e.g. a, b, c) combined with an arbitrary nonspacing mark (e.g. , ) take up two characters wide.

In some programming languages (e.g. Julia), many Unicode characters are well supported as meaningful variables.

However, when typing a nonspacing mark in some programs (WSL bash, WSL vim, git bash, cmd Windows-built-in OpenSSH to Linux bash) and moving the cursor through these strings, some of the cursors fail to move to the beginning, and some of them fail to move to the end.

Originally created by @huangyxi on GitHub (Apr 27, 2022). ### Windows Terminal version 1.12.10983.0 ### Windows build number 10.0.22000.652 ### Other Software software independent just paste some characters into the terminal ### Steps to reproduce Paste the following string into the terminal: ```julia ȳ = ∑y / n ŷ = y - ȳ ``` I have tested the above steps in multiple shells (gitbash, cmd, pwsh, WSL), with multiple fonts (Cascadia Code, Cascadia Mono, Consolas, Courier New, Lucida Console, Source Code Variable), and all behavior is the same. ### Expected Behavior I searched that the Unicode characters U+0304 `◌̄` , U+0302 `◌̂` are belong to a category named "nonspacing mark". From the name, I guess that the nonspacing mark itself should not takes up any space. And it means that an arbitrary normal character (e.g. `a`, `b`, `c`) combined with an arbitrary nonspacing mark (e.g. `ȳ`, `ŷ`) should only take up one character wide. ### Actual Behavior Now an arbitrary normal character (e.g. `a`, `b`, `c`) combined with an arbitrary nonspacing mark (e.g. `ȳ`, `ŷ`) take up two characters wide. In some programming languages (e.g. [Julia](https://docs.julialang.org/en/v1/manual/unicode-input/)), many Unicode characters are well supported as meaningful variables. However, when typing a nonspacing mark in some programs (WSL bash, WSL vim, git bash, cmd Windows-built-in OpenSSH to Linux bash) and moving the cursor through these strings, some of the cursors fail to move to the beginning, and some of them fail to move to the end.
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:39:51 +00:00
Author
Owner

@huangyxi commented on GitHub (Apr 27, 2022):

Additionally, the behavior acted in vscode editor/terminal or gitbash is as expected.

@huangyxi commented on GitHub (Apr 27, 2022): Additionally, the behavior acted in vscode editor/terminal or gitbash is as expected.
Author
Owner

@lhecker commented on GitHub (Apr 27, 2022):

This is related to https://github.com/microsoft/terminal/issues/8000.
Windows Terminal and conhost simply don't support zero width characters just yet unfortunately. 😥

@lhecker commented on GitHub (Apr 27, 2022): This is related to https://github.com/microsoft/terminal/issues/8000. Windows Terminal and conhost simply don't support zero width characters just yet unfortunately. 😥
Author
Owner

@DHowett commented on GitHub (Apr 27, 2022):

Indeed! This is a duplicate of the cluster around 8000.

@DHowett commented on GitHub (Apr 27, 2022): Indeed! This is a duplicate of the cluster around 8000.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17346