GNU bug report logs - #23595
25.1.50; file with chinese/japanse chars, vc-diff fails (HG, Git, RCS)

Previous Next

Package: emacs;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Sat, 21 May 2016 13:03:01 UTC

Severity: normal

Found in version 25.1.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: oub <at> mat.ucm.es, dgutov <at> yandex.ru, 23595 <at> debbugs.gnu.org
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 <oub <at> mat.ucm.es>, Dmitry Gutov <dgutov <at> yandex.ru>,
>  Eli Zaretskii <eliz <at> gnu.org>
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> 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.




This bug report was last modified 9 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.