Card suite Unicode characters are the wrong width #8040

Open
opened 2026-01-31 01:19:16 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (May 9, 2020).

Originally assigned to: @leonMSFT on GitHub.

Environment

Windows build number: Version 10.0.18362.657
Windows Terminal version (if applicable): Commit 7ae34336da

Steps to reproduce

  1. Build commit 7ae34336da
  2. Open a bash shell
  3. Execute printf "\u2660\u2663\u2665\u2666\n"

Expected behavior

This should print our the four card suite Unicode characters, each being one cell wide. Here's what it used to look like in conhost:

image

Actual behavior

Each characters occupies two cells now.

image

I wouldn't be too concerned if these were some recently invented emoji like crying kitten, or dancing monkey with umbrella. But these characters are from the default cmd shell code page (CP437), and they've been narrow characters for going on 40 years now. They're even included in the WGL4 character repertoire. Changing their width is almost guaranteed to break things.

I'm sorry I didn't bring this up before PR #5795 was merged, but I wasn't paying attention to the actual characters that were being changed. I only noticed now when I was testing some of my own code and found that this broke Vttest (it uses the diamond character in a couple of the tests).

Originally created by @j4james on GitHub (May 9, 2020). Originally assigned to: @leonMSFT on GitHub. # Environment Windows build number: Version 10.0.18362.657 Windows Terminal version (if applicable): Commit 7ae34336da0be8428738df5e13dfc4c5f1df6f75 # Steps to reproduce 1. Build commit 7ae34336da0be8428738df5e13dfc4c5f1df6f75 2. Open a bash shell 3. Execute `printf "\u2660\u2663\u2665\u2666\n"` # Expected behavior This should print our the four card suite Unicode characters, each being one cell wide. Here's what it used to look like in conhost: ![image](https://user-images.githubusercontent.com/4181424/81461502-39e20800-91a4-11ea-8944-c878ad4c8499.png) # Actual behavior Each characters occupies two cells now. ![image](https://user-images.githubusercontent.com/4181424/81461517-45cdca00-91a4-11ea-8b37-5da63e426a9e.png) I wouldn't be too concerned if these were some recently invented emoji like crying kitten, or dancing monkey with umbrella. But these characters are from the default cmd shell code page ([CP437](https://en.wikipedia.org/wiki/Code_page_437)), and they've been narrow characters for going on 40 years now. They're even included in the [WGL4](https://en.wikipedia.org/wiki/Windows_Glyph_List_4) character repertoire. Changing their width is almost guaranteed to break things. I'm sorry I didn't bring this up before PR #5795 was merged, but I wasn't paying attention to the actual characters that were being changed. I only noticed now when I was testing some of my own code and found that this broke _Vttest_ (it uses the diamond character in a couple of the tests).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8040