git不显示unicode文件名 [英] git not displaying unicode file names
问题描述
我在Mac OS X上使用git 2.5.4.
I'm using git 2.5.4 on Mac OS X.
我的文件名包含é
,而git正在使用转义符显示它.有没有办法使它使用unicode并显示字符?终端显然可以处理它.
I have filenames containing é
and git is displaying it with escapes. Is there a way to make it use unicode and show the character? The terminal can obviously handle it.
> ls
Sél
> git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
...
"S\303\251l"
我希望该文件显示为Sél
,而不是S\303\251l
.
I'd like that file to display as Sél
, not S\303\251l
.
推荐答案
请首先检查git config core.quotePath false
是否有帮助.
Check first if git config core.quotePath false
helps.
git config --global core.quotePath false
如果没有,如" Mac OS X上的Git和Umlaut问题所述,请尝试:
If not, as stated in "Git and the Umlaut problem on Mac OS X", try:
git config --global core.precomposeunicode true
来自 git config
手册页:
core.precomposeUnicode
此选项仅由Git的Mac OS实现使用.
core.precomposeUnicode=true
时,Git恢复Mac OS完成的文件名的unicode分解.
This option is only used by Mac OS implementation of Git.
Whencore.precomposeUnicode=true
, Git reverts the unicode decomposition of filenames done by Mac OS.
这篇关于git不显示unicode文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!