-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help
Description
Given the fact that PowerShell is moving to Unicode (see #4681, PowerShell/PowerShell-RFC#71 (comment), etc.), it might be a good idea to fix the help
function for this particular case.
PowerShell/src/System.Management.Automation/engine/InitialSessionState.cs
Lines 4261 to 4264 in 5b5168d
# Set the outputencoding to Console::OutputEncoding. More.com doesn't work well with Unicode. | |
$outputEncoding=[System.Console]::OutputEncoding | |
$help = Get-Help @PSBoundParameters |
Known cases where [Console]::OutputEncoding
is set to Unicode:
- PowerShell is launched inside Visual Studio Code
- PowerShell is launched in a non-Windows environment (even Bash on Ubuntu on Windows)
[Console]::OutputEncoding
has been manually set to Unicode
Blocks #7233
A possible workaround is to install less
for Windows and set $env:PAGER
to less.exe
, which supports UTF-8 properly, unlike the old more.com
.
mklement0
Metadata
Metadata
Assignees
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help