git log output encoding issues on Windows 10 command prompt

后端 未结 6 1784
庸人自扰
庸人自扰 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:21

    I use git bash on WIN10. As for me, 4 settings make the appearance as my expectation.

    • env setting. Add LC_ALL=C.UTF-8,LESSCHARSET=UTF-8 to PATH globally.

    • git config. git config --global i18n.logOutputEncoding utf-8.

    • git bash setting. Set Options-> Text-> Character set to utf-8. Or set locale and Character set both to default. It is smart enough to choose the correct encoding.

    Done.

提交回复
热议问题