Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain terminal characters not rendering correctly #15934

Closed
ajkessel opened this issue Sep 6, 2023 · 10 comments
Closed

Certain terminal characters not rendering correctly #15934

ajkessel opened this issue Sep 6, 2023 · 10 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@ajkessel
Copy link

ajkessel commented Sep 6, 2023

Windows Terminal version

1.18.230526002-preview

Windows build number

19045.2846

Other Software

mutt and neomutt use "alternate-character-set" characters to display thread and attachment trees. These characters, which are supposed to be lines and arrows, don't render correctly in Windows Terminal, as shown in the attached screenshot. I suspect there are other apps (maybe ncurses?) that will exhibit similar behavior. Is there a setting that will fix this, a font change, or is it an underlying bug?
2023-09-06_135959

Steps to reproduce

Open Windows Terminal with cygwin
Run mutt or neomutt

Expected Behavior

Visible lines/arrows

Actual Behavior

Aberrant characters

@ajkessel ajkessel added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 6, 2023
@zadjii-msft
Copy link
Member

How do you have your cygwin profile configured/?

Can you share the output of locale?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 6, 2023
@ajkessel
Copy link
Author

ajkessel commented Sep 6, 2023

LANG=
LC_CTYPE="en_US"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_ALL=

I just noticed if I use the powershell profile rather than the cygwin profile, the arrows render correctly. Will dig a bit and see if I can figure out what setting that is and report back, unless you have an idea/suggestion.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 6, 2023
@ajkessel
Copy link
Author

ajkessel commented Sep 6, 2023

Oddly enough, if I ssh from a powershell profile tab to a Linux Box and run mutt, characters render correctly. If I run cygwin bash from the powershell profile tab first, characters render incorrectly.

Same result if I use windows cmd profile.

So it's only rendering incorrectly from within cygwin.

@ajkessel
Copy link
Author

ajkessel commented Sep 6, 2023

export TERM=linux

Fixes the issue. Is this a Windows Terminal problem, cygwin problem, mutt problem, or someting else?

@zadjii-msft
Copy link
Member

This sounds a lot like #14982 (comment)

Does the commandline for your cygwin profile include -l -i/?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Sep 6, 2023
@ajkessel
Copy link
Author

ajkessel commented Sep 6, 2023

Does the commandline for your cygwin profile include -l -i/?

It didn't before, but I just tried adding it and it did not alter the behavior.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 6, 2023
@ajkessel
Copy link
Author

ajkessel commented Sep 6, 2023

I took a look at that issue. term=linux and term=xterm both fix the rendering issue.

@elsaco
Copy link

elsaco commented Sep 8, 2023

@ajkessel the issue seems to be caused by the settings in .minttyrc. Look for the Locale, Charset and Term settings. Here's sample config I'm using:

$ cat .minttyrc
ThemeFile=nord
FontHeight=11
Locale=en_US
Charset=UTF-8
Columns=132
Rows=43
Scrollbar=none
Term=xterm-256color

Notice in your 2nd post how LANG= is not defined. I bet the Term is not defined either.

@ajkessel
Copy link
Author

ajkessel commented Sep 8, 2023

Yes, the issue was term. Setting it to something other than cygwin fixes the character rendering.

@DHowett
Copy link
Member

DHowett commented Sep 8, 2023

Ah, thanks for following up!

Yes, TERM=cygwin engages a translation layer inside Cygwin that is only supposed to be used for old versions of Windows. Those older versions didn't support a lot of modern terminal features in the console, so Cygwin's translation layer is very limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

4 participants