简体   繁体   English

Git,Mac OS X和重音字符

[英]Git, Mac OS X and accented characters

On MacOSX with Git, there is a problem with different UTF8 representations of filename encodings. 在使用Git的MacOSX上,文件名编码的不同UTF8表示存在问题。 (Similar problems also exists in SVN.) (SVN中也存在类似的问题。)

There is a patch for this here . 有这个补丁在这里

I wonder if there is any bug report (in their bug tracker which I haven't found yet) with any discussion about why this haven't been pulled yet or if anyone is working on it, etc. 我想知道是否有任何错误报告(在他们的bug追踪器中,我还没有找到)和任何关于为什么还没有被拉动或者是否有人正在研究它等的讨论。

Enable core.precomposeunicode on the Mac 在Mac上启用core.precomposeunicode

git config --global core.precomposeunicode true

Then reclone the repository. 然后重新放行存储库。 For this to work, you need to have at least Git 1.7.12, which is bundled with Xcode 4.6. 为此,你需要至少拥有Git 1.7.12,它与Xcode 4.6捆绑在一起。

That's it. 而已。

This problem is very known and very understood, see, for example this one . 这个问题是非常已知的和非常了解,看到的,例如这一个 Linus have some voice on this thread too. Linus在这个帖子上也有一些发言权。

There are some patch that paper over the problem, and no developer care enough / have to skill to fix it in the proper way. 有一些补丁可以解决这个问题,没有开发人员足够的关心/必须具备以正确方式修复它的技能。 Maybe, i guess, it is impossible to fix this without breaking old commits. 也许,我想,如果不破坏旧的提交,就不可能解决这个问题。

Besides the patch there is a workaround by translating Mac OS X the encoding for git ! 除了补丁之外,还有一个解决方法是将Mac OS X转换为git的编码 that seems to work for me. 这似乎对我有用。

Well, it was stated here that there is no bug tracker and the common way is to send a mail to their mailing list. 嗯, 这里说的是没有错误跟踪器,常见的方法是将邮件发送到他们的邮件列表。

I just did that here . 我只是做了该在这里 And I messed up the thread a bit. 我把线程搞砸了一下。 :) Further discussion is here . :)进一步的讨论在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM