-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Resolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
When piping input of an application to an Commandlet like Write-Error the written content contains the ansi escaping signs.
For example the command:
dotnet --version | Write-Verbose -VerboseExpected behavior
Printing the following output in yellow:
VERBOSE: 7.0.100Actual behavior
The following Text is printed colorless:
�[33;1mVERBOSE: 7.0.100�[0mError details
If the output is intercepted with Out-String the output seems to work correctly unless the Parameter -Stream is used. Seems like the Encoding is only broken when the text is returned as a stream down the pipline instead of at the end of the command.
For some very odd reason after I type an incorrect parameter like this:
dotnet --version | Write-Verbose -u # -u does not existThe error-message is again displayed with ansi escape signs, but afterwards everything works as expected when I use the previous command again.
Environment data
Name Value
---- -----
PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
Metadata
Metadata
Assignees
Labels
Resolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).
