Certain terminal characters not rendering correctly #20446

Closed
opened 2026-01-31 07:14:02 +00:00 by claunia · 10 comments
Owner

Originally created by @ajkessel on GitHub (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

Originally created by @ajkessel on GitHub (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? <img width="743" alt="2023-09-06_135959" src="https://github.com/microsoft/terminal/assets/3332524/caeb338f-6d67-40f2-94f4-ef58f67b6510"> ### Steps to reproduce Open Windows Terminal with cygwin Run mutt or neomutt ### Expected Behavior Visible lines/arrows ### Actual Behavior Aberrant characters
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:14:03 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Sep 6, 2023):

How do you have your cygwin profile configured/?

Can you share the output of locale?

@zadjii-msft commented on GitHub (Sep 6, 2023): How do you have your cygwin profile configured/? Can you share the output of `locale`?
Author
Owner

@ajkessel commented on GitHub (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.

@ajkessel commented on GitHub (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.
Author
Owner

@ajkessel commented on GitHub (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 commented on GitHub (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.
Author
Owner

@ajkessel commented on GitHub (Sep 6, 2023):

export TERM=linux

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

@ajkessel commented on GitHub (Sep 6, 2023): ``` export TERM=linux ``` Fixes the issue. Is this a Windows Terminal problem, cygwin problem, mutt problem, or someting else?
Author
Owner

@zadjii-msft commented on GitHub (Sep 6, 2023):

This sounds a lot like https://github.com/microsoft/terminal/issues/14982#issuecomment-1615291201

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

@zadjii-msft commented on GitHub (Sep 6, 2023): This sounds a lot like https://github.com/microsoft/terminal/issues/14982#issuecomment-1615291201 Does the `commandline` for your cygwin profile include `-l -i`/?
Author
Owner

@ajkessel commented on GitHub (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.

@ajkessel commented on GitHub (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.
Author
Owner

@ajkessel commented on GitHub (Sep 6, 2023):

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

@ajkessel commented on GitHub (Sep 6, 2023): I took a look at that issue. term=linux and term=xterm both fix the rendering issue.
Author
Owner

@elsaco commented on GitHub (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.

@elsaco commented on GitHub (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.
Author
Owner

@ajkessel commented on GitHub (Sep 8, 2023):

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

@ajkessel commented on GitHub (Sep 8, 2023): Yes, the issue was `term`. Setting it to something other than `cygwin` fixes the character rendering.
Author
Owner

@DHowett commented on GitHub (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.

@DHowett commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20446