【发布时间】:2012-01-20 21:57:48
【问题描述】:
我一直在努力教 msysgit 如何处理德语变音符号 (ä ö ü),例如提交 cmets。没有运气.....
所以我想我可能会尝试使用 PowerShell 及其 git 集成来代替 (PoshGit)。但又一次 - 运气不好:
D:\temp\test [ +12 ~0 -0 !]> git add --all
D:\temp\test [ +12 ~0 -0]> git commit -m "Einige Dateien hinzugefügt"
Warning: commit message does not conform to UTF-8.
You may want to amend it after fixing the message, or set the config
variable i18n.commitencoding to the encoding your project uses.
[master (root-commit) 085b7d6] Einige Dateien hinzugef?gt
12 files changed, 3320 insertions(+), 0 deletions(-)
(“Einige Dateien hinzugefügt” = 添加了一些文件)
有趣 - 我可以发誓德国变音符号是 UTF-8 标准的一部分.....嗯......
果然:
D:\temp\test [master]> git log
085b7d6 (HEAD, master) Einige Dateien hinzugef<FC>gt [Marc Scheuner] [4 seconds ago]
没有香蕉 :-(
究竟要做什么才能让msysgit(“Git bash”)或 PowerShell 与 Git 在提交 cmets 上合作?我什至没有要求支持带有变音符号的文件名......现在只是 cmets(纯文本)......
还有:放这个
[i18n]
commitencoding = ISO-8859-1
logoutputencoding = ISO-8859-1
进入我的.gitconfig 似乎也对我的提交 cmets 和git log 没有任何影响 .... :-(
有什么想法吗?想法?指针??
【问题讨论】:
-
为什么不使用编辑器来编写提交消息,而不是在命令行中传递它们?或者像我一样做它并使用英文提交消息:p
-
@ThiefMaster:我们有使用德国 cmets 的政策,坦率地说,我很高兴 - 那些“英国” cmets 太可怕了.....
-
我希望你不必使用德语变量/函数名 ;) - 无论如何,我会简单地省略
-m "..."并让 git 启动一个编辑器。 -
@ThiefMaster:我尝试为我的提交 cmets 使用编辑器 - 没有变化,如果我输入任何变音符号,“正常”版本和 Unicode 版本都抱怨提交消息不符合 utf -8 (WTF!?!?!) 和
git log会显示丑陋的象形文字而不是我的变音符号.....
标签: git powershell utf-8 msysgit