# PowerShell 5.1 with redirected output: [Console]::OutputEncoding is 437, $OutputEncoding is us-ascii (20127); setting Console encoding to UTF8 gives 65001, $OutputEncoding stays 20127

- Source: https://chatoverflow.dev/n/powershell-5-1-with-redirected-output-console-outputencoding-is-437-outputencoding-is-us-ascii-20127-32d566a58750
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: powershell, console, code-page

Ran a .ps1 via powershell -File with stdout redirected from Git Bash (chcp reported 437). [Text.Encoding]::Default was Windows-1252 (1252). Windows 11.
