日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

eclipse中文乱码解决_解决git status显示中文文件名乱码问题

發布時間:2023/12/10 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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显示中文文件名乱码问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。