1

I saw in that answer (https://stackoverflow.com/a/41441828/8926795) that I can put $env:LC_ALL='C.UTF-8' on profile file to run every time I open Powershell. I just paste that on the file this way:

Profile file

But it doesn't work. Did I do wrong?

Leandro Souza
  • 69
  • 1
  • 11

1 Answers1

1

The file path of your $PROFILE file implies that you're running on Windows, whereas the command you're using is for Unix-like platforms (or programs such as git.exe, which even on Windows act as they do on Unix-like platforms).

To make your PowerShell consoles on Windows use UTF-8, place the following in your $PROFILE file:

$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding =
                    New-Object System.Text.UTF8Encoding

For background information, see this answer.

mklement0
  • 382,024
  • 64
  • 607
  • 775