bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23595: 25.1.50; file with chinese/japanse chars, vc-diff fails (HG,


From: Eli Zaretskii
Subject: bug#23595: 25.1.50; file with chinese/japanse chars, vc-diff fails (HG, Git, RCS)
Date: Mon, 23 May 2016 21:15:57 +0300

> Cc: Uwe Brauer <address@hidden>, Dmitry Gutov <address@hidden>,
>  Eli Zaretskii <address@hidden>
> From: Paul Eggert <address@hidden>
> Date: Mon, 23 May 2016 10:40:40 -0700
> 
> I tried something like the following, which as I understand it is the 
> procedure recommended for putting UTF-16 files under Git control on 
> GNU/Linux hosts (the basic idea is that the repository contains UTF-8 
> and the working files contain UTF-16):
> 
> * Add the line 'test-chin-jap.tex filter=utf16' to .gitattributes.
> 
> * git config filter.utf16.clean 'iconv -f utf-16 -t utf-8'
> 
> * git config filter.utf16.smudge 'iconv -f utf-8 -t utf-16'
> 
> * Commit the file all over again (as this stores the UTF-8 version in 
> the repository, not the UTF-16 version).
> 
> * Make a trivial edit to the file in the non-ASCII region.
> 
> When I did all all this, Emacs 24.5 works and draft Emacs 25 shows 
> mojibake, so we indeed have a regression. The shell command 'git diff' 
> works fine, and outputs the difference in UTF-8, but I guess draft Emacs 
> 25 treats the git diff output as UTF-16.

If the above is the recommended procedure for putting such files under
Git, then vc-git should bind coding-system-for-read to utf-8 whenever

  (coding-system-get buffer-file-coding-system :ascii-compatible-p)

returns nil.  Otherwise, the current binding is TRT.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]