Skip to content

Commit

Permalink
Merge pull request #166 from wslutilities/lts/fix/encoding-issue
Browse files Browse the repository at this point in the history
LTS: Encoding issue (fixes #162)
  • Loading branch information
patrick330602 authored Feb 2, 2021
2 parents c783371 + 08f1a0f commit 1604083
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/wslu-header
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ function chcp_com {
}

function winps_exec {
chcp_com "$(cat ~/.config/wslu/oemcp)"
"$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -NonInteractive –ExecutionPolicy Bypass -Command "$@"
cp="$(cat ~/.config/wslu/oemcp)"
chcp_com "$cp"
cp=$(($cp+0))
"$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -NonInteractive –ExecutionPolicy Bypass -Command "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding($cp); $@"
EXIT_STATUS=$?
chcp_com 65001
return $EXIT_STATUS
Expand Down

0 comments on commit 1604083

Please sign in to comment.