|
From: | Paul Eggert |
Subject: | 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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
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
Description: Source code patch
[Prev in Thread] | Current Thread | [Next in Thread] |