解决中文乱码

本文最后更新于 2024年4月10日 晚上

突然发现 git loggit statusls 都不能正常显示中文,查找后用如下方法解决了问题。

解决 git status 中文乱码

1
git config --global core.quotepath false

解决 git log 中文乱码

1
2
git config --global i18n.commitEncoding UTF-8
git config --global i18n.logOutputEncoding UTF-8

解决 ls 中文乱码

修改 .zshrc.bashrc 文件。

1
2
export LANG=C.UTF-8
export LC_ALL=C.UTF-8

解决中文乱码
https://www.yxuefeng.com/posts/3dd87ec.html
作者
yleoer
发布于
2023年11月2日
许可协议