Can't get git to play nice with iconv and utf-16

前端 未结 3 945
谎友^
谎友^ 2021-01-16 08:25

I\'m trying to get git to recognize UTF-16 as text to allow me to diff and patch as text natively, but I\'m having trouble getting the textconv parameter to wor

3条回答
  •  春和景丽
    2021-01-16 08:42

    Use only diff, it should work:

    *.rc diff=utf16
    

    text and eol cause git to substitute end-of-lines before passing data to iconv, after which it is not a valid utf16 anymore, as noted in comments.

提交回复
热议问题