unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: oub@mat.ucm.es, 23595@debbugs.gnu.org, dgutov@yandex.ru
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	[thread overview]
Message-ID: <8337p863oi.fsf@gnu.org> (raw)
In-Reply-To: <f8721975-6fb6-b47f-eef4-f5420c45635f@cs.ucla.edu> (message from Paul Eggert on Mon, 23 May 2016 10:40:40 -0700)

> Cc: Uwe Brauer <oub@mat.ucm.es>, Dmitry Gutov <dgutov@yandex.ru>,
>  Eli Zaretskii <eliz@gnu.org>
> From: Paul Eggert <eggert@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.





      reply	other threads:[~2016-05-23 18:15 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-21 13:02 bug#23595: 25.1.50; file with chinese/japanse chars, vc-diff fails (HG, Git, RCS) Uwe Brauer
2016-05-23 11:52 ` Dmitry Gutov
2016-05-23 12:41   ` Uwe Brauer
2016-05-23 13:17     ` Dmitry Gutov
2016-05-23 16:52       ` Eli Zaretskii
2016-05-23 16:51     ` Eli Zaretskii
2016-05-23 16:48   ` Eli Zaretskii
2016-05-23 17:00     ` Uwe Brauer
2016-05-23 17:31       ` Eli Zaretskii
2016-05-23 20:37         ` Uwe Brauer
2016-05-23 21:01           ` Lars Ingebrigtsen
2016-05-24  2:33           ` Eli Zaretskii
2016-05-23 21:02     ` Dmitry Gutov
2016-05-23 22:16       ` Paul Eggert
2016-05-23 22:28         ` Dmitry Gutov
2016-05-24  0:07           ` Paul Eggert
2016-05-24  9:47             ` Dmitry Gutov
2016-05-25  6:51               ` Paul Eggert
2016-05-25 12:44                 ` Dmitry Gutov
2016-05-24  2:40         ` Eli Zaretskii
2016-05-24 15:36           ` Eli Zaretskii
2016-05-24  2:36       ` Eli Zaretskii
2016-05-24  9:35         ` Dmitry Gutov
2016-05-24 15:40           ` Eli Zaretskii
2016-05-25  0:09             ` Dmitry Gutov
2016-05-25 16:22               ` Eli Zaretskii
2016-05-25 23:21                 ` Dmitry Gutov
2016-05-26 10:44                   ` Uwe Brauer
2016-05-26 15:35                   ` Eli Zaretskii
2016-06-19 19:09                     ` Dmitry Gutov
2016-05-25  6:19           ` Paul Eggert
2016-05-25 16:27             ` Eli Zaretskii
2016-05-25  6:19         ` Paul Eggert
2016-05-25 16:26           ` Eli Zaretskii
2016-05-23 17:40 ` Paul Eggert
2016-05-23 18:15   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8337p863oi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23595@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eggert@cs.ucla.edu \
    --cc=oub@mat.ucm.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).