2015-10-13 91 views
2

爲什麼git status和相關工具將文件名中的unicode視爲二進制文件?爲什麼git將unicode顯示爲二進制文件?

[991][email protected]:test$ git init foo 
Dépôt Git vide initialisé dans /home/anarcat/test/foo/.git/ 
[992][email protected]:test$ cd foo 
[993][email protected]:foo$ touch hé 
[994][email protected]:foo$ git add hé 
[996][email protected]:foo$ git status --porcelain 
A "h\303\251" 

我想到這將會是:

A hé 

與口音和Unicode罰款文件的內容git的交易,爲什麼文件名特殊的?

回答

4

默認情況下,git以引用的八進制表示法打印非ascii文件名。你可以禁用這個

git config --global core.quotepath off 
+0

這就是我正在尋找的,謝謝雷內! :)我希望這是默認的...至少git應該尊重我的區域... – anarcat

相關問題