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

From: Dmitry Gutov <[email-masked]>
Date: Tue, 24 May 2016 12:47:18 +0300

On 05/24/2016 03:07 AM, Paul Eggert wrote:

> 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....

OK, maybe it's not too important.

> 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.

It works at least as well as my patch, or that's what I could test.

But:

- Shouldn't that change be in vc-coding-system-for-diff?
- It seems to try to fix a separate issue (whether all files use the 
same coding system).
- Like Eli pointed out, (coding-system-get coding-system-for-read 
:ascii-compatible-p) should work about as well. Why doesn't it?

As an aside, how did you manage to create a patch that's using tabs for 
indentation, with indent-tabs-mode bound to nil in .dir-locals.el? 
That's troubling.