![d3e73c7a56076e7aaf54651dbb855ece.png](https://i-blog.csdnimg.cn/blog_migrate/03099e4f6aff91aa522a6406d9c405f2.png)
当我向Github 进行 push
和 pull
时,我的文件名为中文的文件会以 Ascii码
的形式输出,比如:
![2eaec49273d0ca030b7c295d7e0863ab.png](https://i-blog.csdnimg.cn/blog_migrate/e72901bd93b3d39af92d9400f0fa9d96.jpeg)
这些,其实并没有”乱码“,它只是以不直观的Ascii码
的形式向我们输出,我们看不懂而已,比如我在Python中把它中间的一小段解一下码:
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b'350265204346272220347275221345235200'.decode('utf-8')
'资源网址'
>>>
那么,问题是可以中文正常输出吗?
可以:
git config --global core.quotepath false
git config --global i18n.commit.encoding utf-8
git config --global i18n.logoutputencoding utf-8
export LESSCHARSET=utf-8
试验平台:Ubuntu, Manjaro
Cheers!