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


Message #53 received at 23595 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Eli Zaretskii <eliz <at> gnu.org>
Cc: oub <at> mat.ucm.es, 23595 <at> debbugs.gnu.org
Subject: Re: bug#23595: 25.1.50; file with chinese/japanse chars, vc-diff
 fails (HG, Git, RCS)
Date: Mon, 23 May 2016 17:07:31 -0700
[Message part 1 (text/plain, inline)]
On 05/23/2016 03:28 PM, Dmitry Gutov wrote:
> Does it have a bug report? Can we have a test case?

Not as far as I know. I was hoping we wouldn't have to write a bug 
report now, as emacs-25 does not have that bug now. I suppose someone 
with more free time could write a test case....

>
>> One idea to improve on the
>> current emacs-25 behavior is to test whether a simple ASCII message like
>> "Binary files differ" encodes as itself using the file's coding system,
>> and to use the file's coding system if it does and locale-coding-system
>> if it doesn't.
>
> How would we do that? We're currently picking conding-system-for-read 
> well before the first byte of the output is generated.

Emacs can decide the coding system before git diff generates any output, 
by applying decode-coding-string to a canary string sample. The attached 
patch should work; please give it a try.

[0001-Fix-vc-diff-problems-with-UTF-16.patch (application/x-patch, attachment)]

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.