git status输出, 中文文件名显示为转义字符编码(乱码)
2017-05-05 10:44
1161 查看
问题
UTF-8(中文)字符显示为转义字符(乱码)演示
$ touch 测试.txt$ git version git version 2.9.3 $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) "\346\265\213\350\257\225.txt" nothing added to commit but untracked files present (use "git add" to track)
原因
默认情况下, git不处理UTF-8文件名解决办法
git config --global core.quotepath false
补充
git status, 中文显示为八进制转义编码
➜ ~ python3 Python 3.5.2 (default, Sep 14 2016, 11:28:32) [GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> s='测试' >>> s.encode('utf-8') b'\xe6\xb5\x8b\xe8\xaf\x95' >>> s.encode('utf-8')[0] 230 >>> oct(s.encode('utf-8')[0]) '0o346'
相关文章推荐
- Git进行版本控制添加文件时,中文文件名乱码显示数字问题
- php adodb 从mysql数据库中输出中文显示到utf编码网页乱码问题
- 解决在Git 命令输出中的中文文件名显示问题。
- git status 显示中文乱码
- servlet从服务器磁盘文件读出到浏览器显示,中文乱码问题,不要忘记在输入流和输出流都要设置编码格式,否则一个地方没设置不统一就会各种乱码
- git status 中文文件名编码问题解决
- 【Git】git status 中文文件名编码问题解决
- git status 下中文显示乱码问题解决
- GitBash不支持中文(终端输出显示中文乱码)的简单解决办法(自测试Okay)
- Git实用小技巧:git status 中文文件名编码问题解决
- 【转】让CMD窗口显示中文[JAVAC输出中文错误信息乱码的解决]
- utf-8编码引起js输出中文乱码的解决办法
- PHP utf-8编码问题,utf8编码,数据库乱码,页面显示输出乱码
- utf-8编码引起js输出中文乱码的解决办法
- 【整理】解决php输出文件下载时文件名含中文时出现乱码
- 解决FAT32文件系统分区中文文件名在Linux下显示乱码
- cmd 命令行模式下不能输入中文或输出中文时显示乱码的解决办法
- cmd 命令行模式下输出中文时显示乱码的解决方案
- utf-8编码引起js输出中文乱码的解决办法
- 程序输出urf-8编码的xml文件中文(汉字)乱码问题解决方法