Skip to content

Commit

Permalink
fix(pwsh): force module to UTF8
Browse files Browse the repository at this point in the history
resolves #670
  • Loading branch information
JanDeDobbeleer committed Apr 20, 2021
1 parent f7841eb commit b0709e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/powershell/oh-my-posh/oh-my-posh.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Generates the prompt before each line in the console
#>

# Powershell doesn't default to UTF8 just yet, so we're forcing it as there are too many problems
# that pop up when we don't
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding

function Get-PoshCommand {
if ($IsMacOS) {
return "$PSScriptRoot/bin/posh-darwin-amd64"
Expand Down

0 comments on commit b0709e6

Please sign in to comment.