[git]2018-10 solve Git cmd Chinese garbled problem

Source: Internet
Author: User
Tags i18n

October 12, 2018

Inexplicably appear cmd under git log Chinese garbled problem, show a bunch of <E4><A8> and other garbled. Git bash is fine.

Suspicion is an incompatibility issue with Windows system upgrade.

Upgrading git to the latest version does not solve the problem.

Reference online Settings

git config--global i18n.logoutputencoding GBK

No fruit, but Git bash also appeared garbled problem. Probably judging is the code configuration problem of CMD.

Configuration reset to: Git config--global i18n.logoutputencoding utf-8

Search for CMD encoding configuration, there is a reference to use the CHCP command to modify the page encoding to UTF8 (encoded as 65001)

CHCP 65001

Git log still has no effect. The feeling should be the wrong plan, after all except git log, other Chinese display normal.


Add environment variable: lesscharset=utf-8

Git log is displayed as normal after modification.

[git]2018-10 solve Git cmd Chinese garbled problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.