search

Home  >  Q&A  >  body text

cygwin下git log无法显示中文(乱码)

环境是cygwin,git提交是可以用中文,但是显示log却乱码

git的全局配置如下

单独配置

cygwin语系配置如下

大家讲道理大家讲道理2838 days ago758

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2017-04-21 11:17:55

    export LESSCHARSET=utf-8
    

    reply
    0
  • 高洛峰

    高洛峰2017-04-21 11:17:55

    First of all, it is recommended to check whether the version of Cygwin is 1.7.x. This version of Cygwin can already display and input Chinese very well and does not require additional configuration.

    In my Cygwin, the locale configuration is:

    $ locale
    LANG=zh_CN.UTF-8
    LC_CTYPE="zh_CN.UTF-8"
    LC_NUMERIC="zh_CN.UTF-8"
    LC_TIME="zh_CN.UTF-8"
    LC_COLLATE="zh_CN.UTF-8"
    LC_MONETARY="zh_CN.UTF-8"
    LC_MESSAGES="zh_CN.UTF-8"
    LC_ALL=

    Note that the setting of LC_ALL is different from yours. It is recommended to try modifying it. Good luck.

    reply
    0
  • 阿神

    阿神2017-04-21 11:17:55

    git config --global core.quotepath false  
    

    http://blog.fealdia.org/2010/01/16/git-status-utf-8-umlaut-tip/

    reply
    0
  • Cancelreply