From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23595: 25.1.50; file with chinese/japanse chars, vc-diff fails (HG, Git, RCS) Date: Tue, 24 May 2016 18:40:30 +0300 Message-ID: <83iny34g7l.fsf@gnu.org> References: <87bn3z4l9i.fsf@mat.ucm.es> <1444321464004323@web25h.yandex.ru> <83h9do67pp.fsf@gnu.org> <21f6198c-a2fc-365f-caf7-79fad5027f1c@yandex.ru> <83twho41xd.fsf@gnu.org> <1f8cf525-c138-03f6-7f17-65015dc5cdfa@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1464104490 24737 80.91.229.3 (24 May 2016 15:41:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 May 2016 15:41:30 +0000 (UTC) Cc: oub@mat.ucm.es, eggert@cs.ucla.edu, 23595@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 24 17:41:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b5ESL-0007lc-OV for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 May 2016 17:41:18 +0200 Original-Received: from localhost ([::1]:54039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ESG-0006FG-25 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 May 2016 11:41:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ESA-0006Et-AV for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5ES6-0000eL-9s for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:41:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ES6-0000eG-68 for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b5ES5-0005iE-Vk for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2016 15:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23595 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23595-submit@debbugs.gnu.org id=B23595.146410445921939 (code B ref 23595); Tue, 24 May 2016 15:41:01 +0000 Original-Received: (at 23595) by debbugs.gnu.org; 24 May 2016 15:40:59 +0000 Original-Received: from localhost ([127.0.0.1]:36581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5ES2-0005hn-Q0 for submit@debbugs.gnu.org; Tue, 24 May 2016 11:40:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5ERx-0005hV-HW for 23595@debbugs.gnu.org; Tue, 24 May 2016 11:40:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5ERo-0000TT-7T for 23595@debbugs.gnu.org; Tue, 24 May 2016 11:40:48 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ERo-0000Sr-40; Tue, 24 May 2016 11:40:44 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4384 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b5ERk-0008AK-Sf; Tue, 24 May 2016 11:40:42 -0400 In-reply-to: <1f8cf525-c138-03f6-7f17-65015dc5cdfa@yandex.ru> (message from Dmitry Gutov on Tue, 24 May 2016 12:35:40 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118625 Archived-At: > Cc: oub@mat.ucm.es, eggert@cs.ucla.edu, 23595@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 24 May 2016 12:35:40 +0300 > > >What Emacs should do is > > bind coding-system-for-read to utf-8 in this case (not leave it > > unbound as in your patch), under the assumption that the user used the > > procedure outlined by Paul. > > Should `utf-8' altogether replace `undecided' in > vc-coding-system-for-diff? Then the use of buffer-file-coding-system > could be predicated on its being compatible with ascii. Not sure it's a good idea: the solution we found is only known to work with Git, whereas vc-coding-system-for-diff is for any VCS. Mercurial seems to have a similar encode/decode filter feature, but I'm not sure using it means the diff results will be in UTF-8. I think we should have a git-specific function that implements the above idea, and then we should use it in vc-coding-system-for-diff. (I prefer a separate function because my gut feeling is that we will need something like that in other Git operations, when UTF-16 files are involved.) WDYT?