You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This works fine everywhere else for me except in the command prompt and powershell in Windows 10. I am not talking about the Windows Terminal app, it works fine in there.
To Reproduce
Steps to reproduce the behavior:
Make a new Java project or edit an existing one.
Add a simple line of code that will log colorized text into console.
Run the project in the command prompt or in powershell.
The colorized text will have gibberish around it.
Expected behavior
I expected the text to be colorized, which I have seen some programs doing.
Screenshots
Powershell:
Command prompt:
Windows Terminal (expected behavior):
Environment
OS: Windows
Version: 10
The text was updated successfully, but these errors were encountered:
the new support for ANSI Terminal Control which was added to the Windows 10 console host in build 16257 (and later). Namely, it's n̲o̲t̲ e̲n̲a̲b̲l̲e̲d̲ by default. Unless the specific software you're using enables ANSI processing by calling the SetConsoleMode API with the ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x0400) flag, you won't see colors or get ANSI processing for that application.
Can you try these instructions on your machine, and tell me if it fixes the issue? Don't run both, choose powershell or cmd, and run the fix only for that one. We want to have one of the programs behaving incorrectly so we can test my fix later.
(a) Activate support globally by default, persistently, via the registry, as detailed in this SU answer.
In short: In registry key [HKEY_CURRENT_USER\Console], create or set the VirtualTerminalLevel DWORD value to 1
From PowerShell, you can do this programmatically as follows: Set-ItemProperty HKCU:\Console VirtualTerminalLevel -Type DWORD 1
From cmd.exe (also works from PowerShell): reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1
Open a new console window for changes to take effect.
Describe the bug
This works fine everywhere else for me except in the command prompt and powershell in Windows 10. I am not talking about the Windows Terminal app, it works fine in there.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the text to be colorized, which I have seen some programs doing.
Screenshots
Powershell:
Command prompt:
Windows Terminal (expected behavior):
Environment
The text was updated successfully, but these errors were encountered: