DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Chinese Characters Can't Be Displayed Correctly in git log


On Ubuntu 14.04, cat can display Chinese characters correctly. But in vi and less Chinese characters can't display correctly.

Solution:

Run export LC_ALL=en_US.UTF-8 before git log.

If it works, add this line into /etc/environment.

If it doesn't work, run export LANG=en_US.UTF-8.

If it doesn't work, run apt-get install language-pack-en-base.

In vim, run set enc=utf-8.

Ref:

http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue

http://stackoverflow.com/questions/5166652/how-to-view-utf-8-characters-in-vim-or-gvim



Published

Jul 31, 2015

Last Updated

Jul 31, 2015

Category

Tech

Tags

  • Chinese 8
  • git 36
  • unicode 10

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor