Unicode EN (half an EM) cell width #529

Closed
opened 2026-01-30 21:54:28 +00:00 by claunia · 4 comments
Owner

Originally created by @ghost on GitHub (Jan 18, 2019).

In Unicode it is ambiguous width character, but in cmd.exe it is always one cell of EN DASH (U+2013) How can I handle the character?
It is a short horizontal bar with red underline drawn.

First I thought it was a problem with Vim, but apparently when looking at other terminals, cmd.exe appears to be special.
I recognize that the problem of line display and right end display is on Vim side.

In ConPTY, the rows are swapped.
In winpty, the rightmost character is not output.
In cmd.exe, it will display normally.

I brought out two shots.
The first piece is before entering special case of EN DASH to Vim, after the second piece put it in.
The character string is the end part of the result of the Japanese version cl.exe /?.

Continue to the next article.

50749922-6d95e080-1285-11e9-9e1d-f63461680f50

image

Originally created by @ghost on GitHub (Jan 18, 2019). In Unicode it is ambiguous width character, but in cmd.exe it is always one cell of EN DASH (U+2013) How can I handle the character? It is a short horizontal bar with red underline drawn. First I thought it was a problem with Vim, but apparently when looking at other terminals, cmd.exe appears to be special. I recognize that the problem of line display and right end display is on Vim side. In ConPTY, the rows are swapped. In winpty, the rightmost character is not output. In cmd.exe, it will display normally. I brought out two shots. The first piece is before entering special case of EN DASH to Vim, after the second piece put it in. The character string is the end part of the result of the Japanese version cl.exe /?. Continue to the next article. ![50749922-6d95e080-1285-11e9-9e1d-f63461680f50](https://user-images.githubusercontent.com/44701315/51386347-7203a880-1b65-11e9-8236-5596074c3b0f.gif) ![image](https://user-images.githubusercontent.com/44701315/51386507-0241ed80-1b66-11e9-9e51-282c8084b286.png)
claunia added the Product-ConhostArea-Rendering labels 2026-01-30 21:54:28 +00:00
Author
Owner

@ghost commented on GitHub (Jan 18, 2019):

If I want to be compatible with cmd.exe, what should we base on the cell width of the character?
Is there a way to get a list of ambiguous-width characters that cmd.exe treats as fixed-width characters?

@ghost commented on GitHub (Jan 18, 2019): If I want to be compatible with cmd.exe, what should we base on the cell width of the character? Is there a way to get a list of ambiguous-width characters that cmd.exe treats as fixed-width characters?
Author
Owner

@ghost commented on GitHub (Jan 18, 2019):

It is here that is the source.
https://github.com/vim/vim/pull/3775

@ghost commented on GitHub (Jan 18, 2019): It is here that is the source. https://github.com/vim/vim/pull/3775
Author
Owner

@be5invis commented on GitHub (Jan 20, 2019):

Maybe related: #218
Please note that text layout is never a simple task, and, proper Unicode text layout inside a console is never well-studied.

@be5invis commented on GitHub (Jan 20, 2019): Maybe related: #218 Please note that text layout is **never** a simple task, and, proper Unicode text layout inside a console is never well-studied. ![](https://user-images.githubusercontent.com/240091/50608426-9c1f5e80-0f07-11e9-96cf-57177861844d.png)
Author
Owner

@ghost commented on GitHub (Jan 20, 2019):

I have read all the mainstream ( #57, #218 ). This story is interesting.
I remembered the Kanji display that was first installed in NEC PC6001mk2 and felt nostalgic. In those days I used KANJI ROM to read and render using the I/O port.
This genre is really fun!

I talked away.
I think that it is the story of the organization, not individuals or companies, to do this correctly.
It is a dream that it will be published as it is a character defined as an ambiguous width character (EN DASH in this case), and the table that cmd.exe has for rendering exists for each language.
Perhaps we must transcend the cell system. I am looking forward to it.

It seems that other emulators are doing the same thing about display disorder in Vim which is a problem with this issue. First, I will deal with an instant patch.

@ghost commented on GitHub (Jan 20, 2019): I have read all the mainstream ( #57, #218 ). This story is interesting. I remembered the Kanji display that was first installed in NEC PC6001mk2 and felt nostalgic. In those days I used KANJI ROM to read and render using the I/O port. This genre is really fun! I talked away. I think that it is the story of the organization, not individuals or companies, to do this correctly. It is a dream that it will be published as it is a character defined as an ambiguous width character (EN DASH in this case), and the table that cmd.exe has for rendering exists for each language. Perhaps we must transcend the cell system. I am looking forward to it. It seems that other emulators are doing the same thing about display disorder in Vim which is a problem with this issue. First, I will deal with an instant patch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#529