What DVCS support Unicode filenames?

前端 未结 7 962
谎友^
谎友^ 2020-12-24 14:20

I\'m interested in trying out distributed version control systems. git sounds promising, but I saw a note somewhere for the Windows port of git that says \"don\'t use non-AS

7条回答
  •  Happy的楠姐
    2020-12-24 14:43

    This is a really tricky problem. The problems come because either tools try to interpret filenames when they don't know the encoding for sure, or because they translate, but translate to a form which cannot handle all cases (e.g. ASCII or UTF-16). None of the main 3 OS's agree on how a filename is encoded either, making things even harder.

    For a good understanding of the issues I suggest reading Mercurial's encoding strategy page. It describes how the various platforms vary, and why Mercurial has chosen the strategy it has.

    If you really need to do this, then the most basic thing is that ALL systems need to be set-up to use UTF-8 filenames, and not one of the many Japanese code pages. This is easier said than done though, but once it is done, no system should need to translate the filenames into anything else.

    No translation, no issues.


    *: Yes, I know you can have a default system encoding, but this is not the same as a filesystem encoding. What happens when a filesystem is accessed by multiple systems or it is physically moved between systems?

提交回复
热议问题