Get Chinese characters ghost in display when use TUI program #16764

Closed
opened 2026-01-31 05:22:11 +00:00 by claunia · 10 comments
Owner

Originally created by @sharkocha on GitHub (Feb 12, 2022).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.11.3471.0

Windows build number

10.0.22000.0

Other Software

lf r26
fzf 0.29.0
lazygit 0.32.2
powershell 7

Steps to reproduce

install these console TUI software in windows terminal,and just use them interacting with some files in Chinese characters.

Expected Behavior

display characters normally

Actual Behavior

https://user-images.githubusercontent.com/52651594/153695246-fe916770-2e6c-4730-84b2-d425bc157e31.mp4

Originally created by @sharkocha on GitHub (Feb 12, 2022). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.11.3471.0 ### Windows build number 10.0.22000.0 ### Other Software lf r26 fzf 0.29.0 lazygit 0.32.2 powershell 7 ### Steps to reproduce install these console TUI software in windows terminal,and just use them interacting with some files in Chinese characters. ### Expected Behavior display characters normally ### Actual Behavior https://user-images.githubusercontent.com/52651594/153695246-fe916770-2e6c-4730-84b2-d425bc157e31.mp4
claunia added the Area-RenderingIssue-BugNeeds-Tag-FixProduct-Terminal labels 2026-01-31 05:22:12 +00:00
Author
Owner

@lhecker commented on GitHub (Feb 16, 2022):

To reproduce this:

This issue occurs in cmd.exe, but doesn't occur in WSL.
This makes me suspect that this is an issue in lf, or more specifically a bug in one of the packages it depends on, and not in Windows Terminal.

@lhecker commented on GitHub (Feb 16, 2022): To reproduce this: * Install [`lf`](https://github.com/gokcehan/lf#installation) (I can give you a prebuilt binary) * Clone https://github.com/forthespada/InterviewGuide * Navigate through the various .md files in that project This issue occurs in cmd.exe, but doesn't occur in WSL. This makes me suspect that this is an issue in `lf`, or more specifically a bug in one of the packages it depends on, and not in Windows Terminal.
Author
Owner

@zadjii-msft commented on GitHub (Feb 16, 2022):

Hey @lfishRhungry can you help clarify? Which part is unexpected? the glyph size, or the fact that the glyphs remain on the screen at all?

These two frames follow one another:
image
image

The wrongly sized glyphs in the second image are present in the first image. That makes us think they were supposed to be replaced with whitespace, but instead the buffer got corrupted.

https://github.com/gokcehan/lf/issues/451 seems to imply this should have been fixed in r17?

https://github.com/gokcehan/lf/issues/644 was filed in 2021, which sounds like the same thing. That issue was closed by the OP without giving an answer. I'd recommend following up there.

/dup https://github.com/gokcehan/lf/issues/644

@zadjii-msft commented on GitHub (Feb 16, 2022): Hey @lfishRhungry can you help clarify? Which part is unexpected? the glyph size, or the fact that the glyphs remain on the screen at all? These two frames follow one another: ![image](https://user-images.githubusercontent.com/18356694/154300305-57367c59-43f4-43a7-bba4-fbc5b33dffa7.png) ![image](https://user-images.githubusercontent.com/18356694/154300441-57d1775c-017a-4563-8277-db7f6bf88b26.png) The wrongly sized glyphs in the second image are present in the first image. That makes us think they were supposed to be replaced with whitespace, but instead the buffer got corrupted. https://github.com/gokcehan/lf/issues/451 seems to imply this should have been fixed in r17? https://github.com/gokcehan/lf/issues/644 was filed in 2021, which sounds like the same thing. That issue was closed by the OP without giving an answer. I'd recommend following up there. /dup https://github.com/gokcehan/lf/issues/644
Author
Owner

@ghost commented on GitHub (Feb 16, 2022):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Feb 16, 2022): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Author
Owner

@SpicyChickenFLY commented on GitHub (Feb 28, 2022):

Hi @zadjii-msft I think this issue should be reconsidered

gokcehan/lf#644 is not solved yet.
Enable legacy console does make some effect to eliminate some ghost CJK characters. However there are still some ghost characters on display.
Before:
image
After:
image

Simular problems occured in

  • lf (tcell)
  • fzf (tcell)
  • lazygit(gocui->termbox)
  • lazydocker(gocui->termbox)
    These repos use different TUI dependencies, so maybe this problem is not caused by repos listed below.

This makes me suspect that this is an issue occurred when running TUI program coded in Golang in Console_Prompt/PowerShell/Windows_Terminal.

@SpicyChickenFLY commented on GitHub (Feb 28, 2022): Hi @zadjii-msft I think this issue should be reconsidered [gokcehan/lf#644](https://github.com/gokcehan/lf/issues/644) is not solved yet. Enable `legacy console` does make some effect to eliminate some ghost CJK characters. However there are still some ghost characters on display. Before: ![image](https://user-images.githubusercontent.com/24915018/155937281-2c05c028-2f07-406e-a30f-014c8da6a225.png) After: ![image](https://user-images.githubusercontent.com/24915018/155937427-55e2d570-2568-4510-9a20-991cb2c7af3e.png) Simular problems occured in * lf (tcell) * fzf (tcell) * lazygit(gocui->termbox) * lazydocker(gocui->termbox) These repos use different TUI dependencies, so maybe this problem is not caused by repos listed below. This makes me suspect that this is an issue occurred when running TUI program coded in Golang in Console_Prompt/PowerShell/Windows_Terminal.
Author
Owner

@sharkocha commented on GitHub (Mar 1, 2022):

You can open a new issue.
I had change my operation system to linux.😅😅😅Hope to learn more.

@sharkocha commented on GitHub (Mar 1, 2022): You can open a new issue. I had change my operation system to linux.😅😅😅Hope to learn more.
Author
Owner

@bluepongo commented on GitHub (Mar 21, 2022):

May I ask, what is the progress of solving this problem? I have the same problem.

@bluepongo commented on GitHub (Mar 21, 2022): May I ask, what is the progress of solving this problem? I have the same problem.
Author
Owner

@zadjii-msft commented on GitHub (Mar 21, 2022):

We haven't really investigated more. We'll make sure to update this thread when there are updates to share. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@zadjii-msft commented on GitHub (Mar 21, 2022): We haven't really investigated more. We'll make sure to update this thread when there are updates to share. In the meantime, might I recommend the Subscribe button? ![image](https://user-images.githubusercontent.com/18356694/91237459-5cbb0c80-e700-11ea-9347-b9b1ec2813b1.png) That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️
Author
Owner

@CnTeng commented on GitHub (Apr 21, 2022):

I have the same problem, too.

@CnTeng commented on GitHub (Apr 21, 2022): I have the same problem, too.
Author
Owner

@zadjii-msft commented on GitHub (May 4, 2023):

pre-emptively putting into 1.19 to see if Atlas v9000 solved this. I don't think so. I'm still under the impression that this is fundamentally an issue down in tcell. The glyph rendering looks a LOT better in the latest 1.18 builds, but something is absolutely choking on the wide chars.

@zadjii-msft commented on GitHub (May 4, 2023): pre-emptively putting into 1.19 to see if Atlas v9000 solved this. I don't _think_ so. I'm still under the impression that this is fundamentally an issue down in tcell. The glyph rendering looks a LOT better in the latest 1.18 builds, but something is absolutely choking on the wide chars.
Author
Owner

@zadjii-msft commented on GitHub (Aug 17, 2023):

Looks like the new renderer in 1.18 did end up fixing this after all:

gh-12479-fixed

@zadjii-msft commented on GitHub (Aug 17, 2023): Looks like the new renderer in 1.18 did end up fixing this after all: ![gh-12479-fixed](https://github.com/microsoft/terminal/assets/18356694/81824b6a-274b-4297-a6b7-ea8c2fba7c4a)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16764