GNU bug report logs -
#2741
Decoding of vc-annotate output affected by language environment
Previous Next
Full log
Message #27 received at 2741 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Sun, Mar 22, 2009 at 03:23, Stefan Monnier<monnier <at> 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 <at> 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)
This bug report was last modified 15 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.