eclipse中文乱码解决_解决git status显示中文文件名乱码问题
使用 git status 查看本地有改動但未提交的中文文件名時,發現會顯示為一串數字,沒有顯示中文的文件名。具體如下所示:
$ git status# 位于分支 master# 尚未暫存以備提交的變更:# (使用 "git add ..." 更新要提交的內容)# (使用 "git checkout -- ..." 丟棄工作區的改動)## 修改: "224257346216247345210266346265201.txt"解決方案是設置 git 的 core.quotepath 選項為false:
git config --global core.quotepath false查看git在線幫助手冊 (https://git-scm.com/docs/git-config),里面對 core.quotepath 選項說明如下:
core.quotePath
Commands that output paths (e.g. ls-files, diff), will quote "unusual" characters in the pathname by enclosing the pathname in double-quotes and escaping those characters with backslashes in the same way C escapes control characters (e.g. t for TAB, n for LF, for backslash) or bytes with values larger than 0x80 (e.g. octal 302265 for "micro" in UTF-8). If this variable is set to false, bytes higher than 0x80 are not considered "unusual" any more. Double-quotes, backslash and control characters are always escaped regardless of the setting of this variable. A simple space character is not considered "unusual". Many commands can output pathnames completely verbatim using the -z option. The default value is true.
即,core.quotepath 選項為 true 時,會對中文字符進行轉義再顯示,看起來就像是亂碼。設置該選項為false,就會正常顯示中文。
在一些終端上還要檢查它自身的語言設置,看終端是否可以正常顯示中文。
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的eclipse中文乱码解决_解决git status显示中文文件名乱码问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2016.6.17——Remove Du
- 下一篇: 转:13个大数据应用案例,告诉你最真实的