ANSI escape codes in output using git for windows #17472

Open
opened 2026-01-31 05:43:30 +00:00 by claunia · 0 comments
Owner

Originally created by @jcrben on GitHub (May 14, 2022).

NOTE: I've seen some reports which suggest that this would be fixed by later Windows versions, so I'm on the Windows Insider preview... I've seen this with another application (https://github.com/go-task/task); I've also used ansicon to get around it but that cuts out some of the scrollback

Windows Terminal version

1.12.10983.0

Windows build number

10.0.22621.0

Other Software

No response

Steps to reproduce

Download https://search.maven.org/search?q=a:junit-platform-console-standalone by clicking the Download link
image

Install java: winget install Microsoft.OpenJDK.11
Install Git for Windows interactively: winget install Git.Git -i

When installing Git for Windows, enable the option to add it to the Microsoft Terminal

Open a Git Bash tab:

Execute the following:
`cd ~/Downloads; 'C:\Program Files\Microsoft\jdk-11.0.15.10-hotspot\bin\java.exe' -jar ./junit-platform-console-standalone-1.8.2.jar;

The output contains ANSI escape codes:
image

Expected Behavior

Colored output (or bolded, underlined - not sure what the codes map over to)

Actual Behavior

ANSI escape codes

Originally created by @jcrben on GitHub (May 14, 2022). NOTE: I've seen some reports which suggest that this would be fixed by later Windows versions, so I'm on the Windows Insider preview... I've seen this with another application (https://github.com/go-task/task); I've also used ansicon to get around it but that cuts out some of the scrollback ### Windows Terminal version 1.12.10983.0 ### Windows build number 10.0.22621.0 ### Other Software _No response_ ### Steps to reproduce Download https://search.maven.org/search?q=a:junit-platform-console-standalone by clicking the Download link ![image](https://user-images.githubusercontent.com/5614134/168408615-55ddcd5d-b422-4eb3-a11a-f4e3489b04d9.png) Install java: `winget install Microsoft.OpenJDK.11` Install Git for Windows interactively: `winget install Git.Git -i` When installing Git for Windows, enable the option to add it to the Microsoft Terminal Open a Git Bash tab: Execute the following: `cd ~/Downloads; 'C:\Program Files\Microsoft\jdk-11.0.15.10-hotspot\bin\java.exe' -jar ./junit-platform-console-standalone-1.8.2.jar; The output contains ANSI escape codes: ![image](https://user-images.githubusercontent.com/5614134/168409124-65f06f2a-8d74-46b1-98db-2623b7615fea.png) ### Expected Behavior Colored output (or bolded, underlined - not sure what the codes map over to) ### Actual Behavior ANSI escape codes
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 05:43:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17472