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
{{ message }}
Repository navigation
$PSStyle.Formatting.TableHeader writes out the ANSI codes in a legacy console that doesn't support virtual terminal #15978
Start PowerShell 7.2.0-preview.9 with a legacy console host (e.g. use 2012R2), and then run Get-Module.
Expected: The table view should not have any ANSI code written out.
Actual: ANSI codes are written out in the table view
Expected behavior
The table view should not have any ANSI code written out.ANSI code should be ignored when the host doesn't support virtual terminal.
Actual behavior
ANSI codes are written out in the table view
Error details
No response
Environment data
Name Value
---------
PSVersion 7.2.0-preview.9
PSEdition Core
GitCommitId 7.2.0-preview.9
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Should ANS.1 characters be filtered by Out-Default depending current host or do we need augment formatting engine? Anyway, no meta data should show in the screen view. Formatting engine need to know VT100 codes and discard them at need, when host can't understand them leaving data as it is. Some codes like `e[2J Clear-Terminal (at 80's Univac paper terminals did a form feed and discard any pending data - video terminals emulate that in good and bad), but many others don't on legacy host on Windows.
Activity
ertyz commentedon Aug 24, 2021
Is it ok on Windows 2016 LTS or not?
Pekka-Kalevi commentedon Sep 12, 2021
Should ANS.1 characters be filtered by Out-Default depending current host or do we need augment formatting engine? Anyway, no meta data should show in the screen view. Formatting engine need to know VT100 codes and discard them at need, when host can't understand them leaving data as it is. Some codes like `e[2J Clear-Terminal (at 80's Univac paper terminals did a form feed and discard any pending data - video terminals emulate that in good and bad), but many others don't on legacy host on Windows.
daxian-dbw commentedon Sep 13, 2021
ertyz I didn't try but I guess it will have the same issue on Windows Server 2016. But we will get it fixed before 7.2 GA
Pekka-Kalevi It should be filtered out depending on current host.