Unicode box drawing rendering issues #2796

Closed
opened 2026-01-30 23:05:19 +00:00 by claunia · 13 comments
Owner

Originally created by @vblazhkun on GitHub (Jul 16, 2019).

Environment

Windows build number: [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.2.1831.0

Any other software?

- WSL Ubuntu: [1804.2019.521.0]
- Midnight Commander (standard WSL Ubuntu repository).

Steps to reproduce

  1. Install Pragmata Pro Mono Liga 0.827 font (any other Unicode font should work as well).
  2. Install Midnight Commander under WSL Ubuntu.
    $ sudo apt install mc
    
  3. Run Midnight Commander.
    $ TERM=xterm-256color mc -d -S modarin256-defbg
    
  4. If the issue is not there, try to resize the Terminal window or make it full screen. Press CTRL-O several times.

Expected behavior

All box drawing characters rendered correctly.

Actual behavior

Various characters rendering issues (see the red marks on the picture):

terminal-bug-01

Originally created by @vblazhkun on GitHub (Jul 16, 2019). # Environment ```none Windows build number: [Version 10.0.18362.239] Windows Terminal version (if applicable): 0.2.1831.0 Any other software? - WSL Ubuntu: [1804.2019.521.0] - Midnight Commander (standard WSL Ubuntu repository). ``` # Steps to reproduce 1. Install Pragmata Pro Mono Liga 0.827 font (any other Unicode font should work as well). 2. Install Midnight Commander under WSL Ubuntu. ```shell $ sudo apt install mc ``` 3. Run Midnight Commander. ```shell $ TERM=xterm-256color mc -d -S modarin256-defbg ``` 4. If the issue is not there, try to resize the Terminal window or make it full screen. Press CTRL-O several times. # Expected behavior All box drawing characters rendered correctly. # Actual behavior Various characters rendering issues (see the red marks on the picture): ![terminal-bug-01](https://user-images.githubusercontent.com/7956686/61333018-694b1100-a82e-11e9-908f-69828d9ff5a9.png)
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-30 23:05:19 +00:00
Author
Owner

@egmontkob commented on GitHub (Jul 17, 2019):

This is the typical phenomenon when the terminal's parser doesn't reconstruct a UTF-8 character properly if its bytes arrive with a slight delay. E.g. the following Unix command:

printf '\xe2'; sleep 1; printf '\x95'; sleep 1; printf '\x91\n'

needs to produce a U+2551 double vertical bar after 2 seconds; does it?

@egmontkob commented on GitHub (Jul 17, 2019): This is the typical phenomenon when the terminal's parser doesn't reconstruct a UTF-8 character properly if its bytes arrive with a slight delay. E.g. the following Unix command: printf '\xe2'; sleep 1; printf '\x95'; sleep 1; printf '\x91\n' needs to produce a U+2551 double vertical bar `║` after 2 seconds; does it?
Author
Owner

@egmontkob commented on GitHub (Jul 17, 2019):

There's another glitch on the screenshot, to the bottom right of the big red circle: the single horizontal line is too long. (Not sure how this could be explained by a faulty UTF-8 decoder, though.)

@egmontkob commented on GitHub (Jul 17, 2019): There's another glitch on the screenshot, to the bottom right of the big red circle: the single horizontal line is too long. (Not sure how this could be explained by a faulty UTF-8 decoder, though.)
Author
Owner

@vblazhkun commented on GitHub (Jul 17, 2019):

This is the typical phenomenon when the terminal's parser doesn't reconstruct a UTF-8 character properly if its bytes arrive with a slight delay. E.g. the following Unix command:

printf '\xe2'; sleep 1; printf '\x95'; sleep 1; printf '\x91\n'

needs to produce a U+2551 double vertical bar after 2 seconds; does it?

  • I do not see the faulty behavior with PuTTY 0.71 (and have never seen it before since ages with any older revision of PuTTY).
  • I have run the commands you provided 100 times in a cycle, no issues noticed.
@vblazhkun commented on GitHub (Jul 17, 2019): > This is the typical phenomenon when the terminal's parser doesn't reconstruct a UTF-8 character properly if its bytes arrive with a slight delay. E.g. the following Unix command: > > ``` > printf '\xe2'; sleep 1; printf '\x95'; sleep 1; printf '\x91\n' > ``` > > needs to produce a U+2551 double vertical bar `║` after 2 seconds; does it? - I do not see the faulty behavior with `PuTTY 0.71` (and have never seen it before since ages with any older revision of `PuTTY`). - I have run the commands you provided 100 times in a cycle, no issues noticed.
Author
Owner

@vblazhkun commented on GitHub (Jul 17, 2019):

There's another glitch on the screenshot, to the bottom right of the big red circle: the single horizontal line is too long. (Not sure how this could be explained by a faulty UTF-8 decoder, though.)

Yes, it is a rendering bug as well. There should be a connected double bar, instead of the horizontal line.

@vblazhkun commented on GitHub (Jul 17, 2019): > There's another glitch on the screenshot, to the bottom right of the big red circle: the single horizontal line is too long. (Not sure how this could be explained by a faulty UTF-8 decoder, though.) Yes, it is a rendering bug as well. There should be a connected double bar, instead of the horizontal line.
Author
Owner

@egmontkob commented on GitHub (Jul 17, 2019):

I have run the commands you provided 100 times in a cycle, no issues noticed.

It's not as obvious as I thought, then. :-) We'll have to wait for the Microsoft guys to investigate.

I do not see the faulty behavior with PuTTY 0.71

I have used mc for many-many years (most of the time in gnome-terminal), and never faced such bug except when it turned out to be an issue with the emulator. Also I keep an eye on its bugtracker and can't recall seeing anything like this. mc uses a screen drawing library (either ncurses or slang), so if it was a bug in them then it would probably cause issues in other apps too. I think we can pretty certainly exclude the possibility of the bug being in mc (or the screen drawing library it uses).

@egmontkob commented on GitHub (Jul 17, 2019): > I have run the commands you provided 100 times in a cycle, no issues noticed. It's not as obvious as I thought, then. :-) We'll have to wait for the Microsoft guys to investigate. > I do not see the faulty behavior with PuTTY 0.71 I have used mc for many-many years (most of the time in gnome-terminal), and never faced such bug except when it turned out to be an issue with the emulator. Also I keep an eye on its bugtracker and can't recall seeing anything like this. mc uses a screen drawing library (either ncurses or slang), so if it was a bug in them then it would probably cause issues in other apps too. I think we can pretty certainly exclude the possibility of the bug being in mc (or the screen drawing library it uses).
Author
Owner

@vblazhkun commented on GitHub (Jul 17, 2019):

I have run the commands you provided 100 times in a cycle, no issues noticed.

It's not as obvious as I thought, then. :-) We'll have to wait for the Microsoft guys to investigate.

  • Increased the cycle count to 1000, still no rendering issues.
  • Issued the same within the alternative screen of mc, no rendering issues.
@vblazhkun commented on GitHub (Jul 17, 2019): > > I have run the commands you provided 100 times in a cycle, no issues noticed. > > It's not as obvious as I thought, then. :-) We'll have to wait for the Microsoft guys to investigate. - Increased the cycle count to 1000, still no rendering issues. - Issued the same within the alternative screen of `mc`, no rendering issues.
Author
Owner

@vblazhkun commented on GitHub (Jul 17, 2019):

I can reproduce the similar by just catting the UTF-8 Demo Text from the native Windows Terminal WLS Ubuntu tab:

image

@vblazhkun commented on GitHub (Jul 17, 2019): I can reproduce the similar by just catting the [`UTF-8 Demo Text`](https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt) from the native Windows Terminal WLS Ubuntu tab: ![image](https://user-images.githubusercontent.com/7956686/61396716-ff377800-a8d0-11e9-89a9-5c3c9fc859a7.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 17, 2019):

A good amount of this was probably fixed by #1850 😄

@DHowett-MSFT commented on GitHub (Jul 17, 2019): A good amount of this was probably fixed by #1850 :smile:
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 20, 2019):

If you're comfortable installing a dev build, would you be able to do that? All you need is Visual Studio and this repository. I'd like to see if #1850 helped this at all.

@DHowett-MSFT commented on GitHub (Jul 20, 2019): If you're comfortable installing a dev build, would you be able to do that? All you need is Visual Studio and this repository. I'd like to see if #1850 helped this at all.
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 20, 2019):

(If not, i'm going to assume that this was fixed by 1850 and the followup you filed which I duped to #455)

@DHowett-MSFT commented on GitHub (Jul 20, 2019): (If not, i'm going to assume that this was fixed by 1850 and the followup you filed which I duped to #455)
Author
Owner

@vblazhkun commented on GitHub (Jul 20, 2019):

If you're comfortable installing a dev build, would you be able to do that? All you need is Visual Studio and this repository. I'd like to see if #1850 helped this at all.

@DHowett-MSFT Yes, I will check the dev build. So far, I was not able to get the VS as the downloads from MSFT site do not work.

@vblazhkun commented on GitHub (Jul 20, 2019): > If you're comfortable installing a dev build, would you be able to do that? All you need is Visual Studio and this repository. I'd like to see if #1850 helped this at all. @DHowett-MSFT Yes, I will check the dev build. So far, I was not able to get the VS as the downloads from MSFT site do not work.
Author
Owner

@vblazhkun commented on GitHub (Jul 21, 2019):

@DHowett-MSFT I was checking the issue with the latest dev build and, while resizing the terminal window, I have got a crash. Where do I find the core dump file to upload?

UPD: Found it, how do I upload the dump securely?

UPD2: Seems it is the issue #2045, I will do some more tests to confirm #1991 is fully resolved.

@vblazhkun commented on GitHub (Jul 21, 2019): @DHowett-MSFT I was checking the issue with the latest dev build and, while resizing the terminal window, I have got a crash. Where do I find the core dump file to upload? UPD: Found it, how do I upload the dump securely? UPD2: Seems it is the issue #2045, I will do some more tests to confirm #1991 is fully resolved.
Author
Owner

@vblazhkun commented on GitHub (Jul 23, 2019):

Fixed in the latest dev build.

@vblazhkun commented on GitHub (Jul 23, 2019): Fixed in the latest dev build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2796