【问题标题】:Characters encoding wrong in terminal using git使用git在终端中编码错误的字符
【发布时间】:2012-09-22 16:41:10
【问题描述】:

每当我尝试使用“git diff”命令查看文件更改时,它都会向我显示特殊字符的问题,例如重音字符,但如果我看到带有“cat”的文件,它会显示一切正常。我正在使用 Ubuntu 12.04 LTS。

例如:

WHERE  `T<C3><A9>cnico` IS NOT NULL

我尝试将这些行放在.gitconfig中,关闭终端e再次打开,但仍然没有工作。

[i18n]
    logoutputencoding = utf8
    commitencoding = utf8

还有其他建议吗?

【问题讨论】:

    标签: git encoding ubuntu-12.04


    【解决方案1】:

    确保您的 git 版本。

    对于Ubuntu12.0.4 (precise), the package search for git 表示:

    git-core (1:1.7.9.5-1) 
    

    并且 i18n 问题已在 git1.7.10+ 中得到解决(参见“git, msysgit, accents, utf-8, the definitive answers”)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-27
      • 1970-01-01
      • 2023-03-13
      • 2014-03-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多