all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 2741@emacsbugs.donarmstrong.com
Subject: bug#2741: Mixed UTF-8 and raw bytes in output of vc-annotate after (set-language-environment "UTF-8")
Date: Thu, 10 Sep 2009 01:18:20 +0200	[thread overview]
Message-ID: <f7ccd24b0909091618j677671d5k392cca239d608ddd@mail.gmail.com> (raw)
In-Reply-To: <jwvk56is68x.fsf-monnier+emacsbugreports@gnu.org>

On Sun, Mar 22, 2009 at 03:23, Stefan Monnier<monnier@iro.umontreal.ca> wrote:

> I don't see a mixture of anything, I just see latin-1 encoded chars
> decoded incorrectly because Emacs somehow decided to try and decode the
> stream using the utf-8 coding-system.
> But yes that's a bug.  `vc-annotate' should use the main file's
> coding-system to decode the annotated text, regardless of
> language environment.

The following patch fixes it.

The change is in `vc-annotate' and not `vc-git-annotate-command'
because the bug is not git-specific. I can easily reproduce it with
bzr, for example.

    Juanma


2009-09-09  Juanma Barranquero  <lekktu@gmail.com>

	* vc-annotate.el (vc-annotate): Use the main file's coding-system to
	decode annotated text, regardless of language environment.  (Bug#2741)


Index: vc-annotate.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-annotate.el,v
retrieving revision 1.8
diff -u -2 -r1.8 vc-annotate.el
--- vc-annotate.el	10 Mar 2009 00:59:09 -0000	1.8
+++ vc-annotate.el	9 Sep 2009 23:11:24 -0000
@@ -376,5 +376,6 @@
 		(setq temp-buffer-name (buffer-name))))
     (with-output-to-temp-buffer temp-buffer-name
-      (let ((backend (vc-backend file)))
+      (let ((backend (vc-backend file))
+	    (coding-system-for-read buffer-file-coding-system))
         (vc-call-backend backend 'annotate-command file
                          (get-buffer temp-buffer-name) rev)





  parent reply	other threads:[~2009-09-09 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f7ccd24b0909110402t5bf8123dh6104f26a17a9c3b8@mail.gmail.com>
2009-03-21 23:23 ` bug#2741: Mixed UTF-8 and raw bytes in output of vc-annotate after (set-language-environment "UTF-8") Juanma Barranquero
2009-03-22  1:23   ` Stefan Monnier
2009-03-22  1:31     ` Juanma Barranquero
2009-09-09 23:18     ` Juanma Barranquero [this message]
2009-09-11 11:10   ` bug#2741: marked as done (Decoding of vc-annotate output affected by language environment) Emacs bug Tracking System

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

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

  git send-email \
    --in-reply-to=f7ccd24b0909091618j677671d5k392cca239d608ddd@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=2741@emacsbugs.donarmstrong.com \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.