git log output encoding issues on Windows 10 command prompt

后端 未结 6 1788
庸人自扰
庸人自扰 2020-11-30 17:41

Problem

How to make git log command output properly displayed on windows command prompt?

Example

As you can see I can type diacriti

6条回答
  •  我在风中等你
    2020-11-30 18:22

    If anyone is interested in the PowerShell equivalent of set LC_ALL=C.UTF-8, that is:

    $env:LC_ALL='C.UTF-8'
    

    However this works only for the current session. To make it permanent, two possibilities:

    • create an environment variable named LC_ALL with the value C.UTF-8
    • or put $env:LC_ALL='C.UTF-8' in your $Profile file

提交回复
热议问题