Repository navigation
Closed
Labels
OS-WindowsResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime
Milestone
Description
Steps to reproduce
powershell -c {[console]::Error.Write('abc')} 2>&1`Expected behavior
powershell : abc
At line:1 char:6
+ $q = powershell -c "[console]::Error.Write('abc')" 2>&1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (abc:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Actual behavior
powershell : Cannot process the XML from the 'Error' stream of
'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe': Data at the root level is invalid. Line 1, position 1.
At line:1 char:1
+ powershell -c {[console]::Error.Write('abc')} 2>&1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SyntaxError: (C:\WINDOWS\Syst...\powershell.exe:String) [], XmlException
+ FullyQualifiedErrorId : ProcessStreamReader_CliXmlError
Environment data
This repros on Full Framework build and on inbox PS v5.1 on Windows.
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14393.0
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.0
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name Value
---- -----
PSVersion 6.0.0-alpha
PSEdition WindowsPowerShell
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.7-117-gbbddfe81a5a72f45e4a650cf3f42a0ca1eda86aa
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1Metadata
Metadata
Assignees
Labels
OS-WindowsResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime
Activity
vors commentedon Jul 29, 2016
Related. We don't handle encoding properly
andyleejordan commentedon Aug 1, 2016
OH! This is related to #1524.
joeyaiello commentedon May 23, 2017
This is fixed now:
jszabo98 commentedon May 6, 2019
Fixed (unicode no bom)? (pwsh not powershell)
vors commentedon Jun 15, 2019
Doesn't repro for me on 7.0.0-beta1 on mac.