search

Home  >  Q&A  >  body text

windows git 输入中文 乱码

找了一些网上的方案 ls 可以显示中文
但是输入在 git bash 输入中文 还是乱码

怪我咯怪我咯2848 days ago765

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-25 09:06:22

    You can use the command prompt that comes with Windows instead of the one provided by git. Just add the directory where the git execution file is located to the PATH environment variable.


    Git bash will automatically change the code page in the settings to 437 (United States), which is a headache. But you can still change the code page in git bash, using the chcp program. Reference: http://stackoverflow.com/questions/1259084/what-encoding-code-page-is-cmd-exe-using

    $ /c/windows/system32/chcp.com 936
    活动代码页: 936
    

    936 is the Chinese code page.

    reply
    0
  • 阿神

    阿神2017-04-25 09:06:22

    Git for windows Chinese garbled solution

    reply
    0
  • Cancelreply