From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: [PCL-CVS] Interactive diff on a utf-8 encoded file Date: Tue, 09 Sep 2003 11:56:08 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F5E1438.8060804@yahoo.com> References: <3f5e0162$0$20183$626a54ce@news.free.fr> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1063132648 18232 80.91.224.253 (9 Sep 2003 18:37:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2003 18:37:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 20:37:26 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19wnMk-0003T4-00 for ; Tue, 09 Sep 2003 20:37:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19wnLR-0000cZ-W6 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2003 14:36:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 63 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: news.uni-berlin.de 1063130166 21239347 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:116477 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12396 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12396 Jérôme Haguet wrote: > Hello > I have > - GNU Emacs 21.3 on Windows > - a CVS checkout in which most of the files are encoded in ISO-8859-1 and > some others in UTF-8. > > All the utf-8 encoded files have the .utf extension > I have added in my .emacs the following line : > (add-to-list 'file-coding-system-alist (list "\\.utf" 'utf-8)) > prefer-coding-system is set to 'iso-latin-1 > > Everything works fine when I open a file (Emacs set the right coding system) > > My problem is when I run interactive diff from PCL-CVS (d e) > Emacs always set the coding system of the BASE version of the .utf files to > iso-8859-1 >>From pcvs.el: ;;; Bugs: ;; - Extracting an old version seems not to recognize encoding correctly. ;; That's probably because it's done via a process rather than a file. > Any idea how to fix this ? Maybe cvs-retrieve-revision can be hacked. Does this *untested* patch work? *** emacs-21.3/lisp/pcvs.el.orig Sat Sep 22 14:23:16 2001 --- emacs-21.3/lisp/pcvs.el Tue Sep 9 11:54:55 2003 *************** *** 1519,1526 **** (or (find-buffer-visiting buffile) (with-current-buffer (create-file-buffer buffile) (message "Retrieving revision %s..." rev) ! (let ((res (call-process cvs-program nil t nil ! "-q" "update" "-p" "-r" rev file))) (when (and res (not (and (equal 0 res)))) (error "Something went wrong retrieving revision %s: %s" rev res)) (set-buffer-modified-p nil) --- 1519,1529 ---- (or (find-buffer-visiting buffile) (with-current-buffer (create-file-buffer buffile) (message "Retrieving revision %s..." rev) ! (let* ((process-coding-system-alist ! (list (cons (regexp-quote cvs-program) ! buffer-file-coding-system))) ! (res (call-process cvs-program nil t nil ! "-q" "update" "-p" "-r" rev file))) (when (and res (not (and (equal 0 res)))) (error "Something went wrong retrieving revision %s: %s" rev res)) (set-buffer-modified-p nil) -- Kevin Rodgers