字符编码错误在终端使用git [英] Characters encoding wrong in terminal using git
问题描述
每当我尝试使用git diff命令查看文件更改时,都会显示特殊字符(如重音符号)的问题,但如果我看到带有cat的文件,则会显示所有的内容。我正在使用Ubuntu 12.04 LTS。
ex:
WHERE`我想尝试把这些行放在里面。T C3 C& gitconfig,关闭终端e再次打开,但仍然没有工作。 [i18n]
logoutputencoding = utf8
commitencoding = utf8
任何人都有其他建议?
解决方案确保您的git版本。
对于 Ubuntu12.0.4(精确),git的包搜索表示a:
git-core(1:1.7.9.5-1)
和i18n问题已经在git1.7.10 +中解决(参见 git,msysgit,口音,utf-8,最终答案)。 p>
Any time I try to make a "git diff" command to see a file change, it shows me problem in special characters, like accented ones, but if I see the file with "cat" it shows me everything ok. I am using Ubuntu 12.04 LTS.
ex:
WHERE `T<C3><A9>cnico` IS NOT NULL
I tried to put these lines in .gitconfig, close terminal e open again, but still didn't work.
[i18n]
logoutputencoding = utf8
commitencoding = utf8
Anyone have other suggestion?
解决方案 Make sure of your git version.
For Ubuntu12.0.4 (precise), the package search for git indicates a:
git-core (1:1.7.9.5-1)
And i18n issues have been addressed in git1.7.10+ (see "git, msysgit, accents, utf-8, the definitive answers").
这篇关于字符编码错误在终端使用git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!