Summary of the new feature / enhancement
Powershell currently defaults to the console output encoding when running a native command. (NativeCommandProcessor.cs:1330). This is the right default for most programs, but some software chooses to output a different encoding instead (Most commonly UTF-8). e.g. Rust programs, or programs that use activeCodePage in their manifest.
The problem is that there is no way to specify an alternate encoding using Powershell syntax. This leads to either having to temporarily change [Console]::OutputEncoding, or to run the process using the .NET Process class directly: starship/src/init/starship.ps1:26-65.
It would help if there was a builtin way to do this concisely.
Proposed technical implementation details (optional)
Either a parameter to some cmdlet (Start-Process? Not sure if that one allows reading output, not to a file, though... ) that allows setting the StandardOutputEncoding). Or some new syntax for it, such as a special cast.
Summary of the new feature / enhancement
Powershell currently defaults to the console output encoding when running a native command. (NativeCommandProcessor.cs:1330). This is the right default for most programs, but some software chooses to output a different encoding instead (Most commonly UTF-8). e.g. Rust programs, or programs that use
activeCodePagein their manifest.The problem is that there is no way to specify an alternate encoding using Powershell syntax. This leads to either having to temporarily change
[Console]::OutputEncoding, or to run the process using the .NETProcessclass directly: starship/src/init/starship.ps1:26-65.It would help if there was a builtin way to do this concisely.
Proposed technical implementation details (optional)
Either a parameter to some cmdlet (
Start-Process? Not sure if that one allows reading output, not to a file, though... ) that allows setting theStandardOutputEncoding). Or some new syntax for it, such as a special cast.