From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B.T. Raven" Newsgroups: gmane.emacs.help Subject: Re: \201 chars showing up in buffer when using emacs from mutt Date: Thu, 24 Mar 2005 18:39:42 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <1146nfe3solhd5@corp.supernews.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111711474 12001 80.91.229.2 (25 Mar 2005 00:44:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2005 00:44:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 25 01:44:34 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DEcwB-0001tx-D2 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Mar 2005 01:44:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEdBY-0004Ul-Lh for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Mar 2005 20:00:24 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!tethys.csu.net!nntp.csufresno.edu!sn-xit-03!sn-xit-09!sn-xit-08!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-X-Complaints-To: abuse@supernews.com Original-Lines: 47 Original-Xref: shelby.stanford.edu gnu.emacs.help:129577 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:25128 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25128 wrote in message news:mailman.114.1111668219.28103.help-gnu-emacs@gnu.org... Hi all, I am using emacs as the editor for mutt; however, I have never been able to get it working correctly, as quite often emacs will not detect that a text file is, in fact utf8 (that's when i get the '\201' character before accented characters like in German). I've found similar problems on the mailing list, but no solution that seems to work; that includes setting utf8 as the preferred encoding.Also, it does not really seem to matter what charset I use in mutt, or my exact setting in .emacs. So does anyone have bullet proof settings such that I will never see that dreaded \201 again? I am *almost* capabable of just removing them trough some hook function when I start emacs, but taht seems very evil. Thanks in advance Dirk. The next time you see all the characters correctly displayed in the buffer, put ;; -*- coding: utf-8 -*- at the top of the file. Then type C-x RET f utf-8 before saving the buffer again. This explicit hint in the first line of the file will prevent emacs from considering any other encoding when it reads the file again. I don't know what mutt is but if it executes the text file, maybe the line starting with ;; could be wrapped in another kind of multi-line comment (like /*....*/ in C) C-x RET I utf-8 should also work since (I think) default-buffer-file-coding-system's value is persistent across sessions. Alternatively you could set currentl-language-environment with M-x customize but then you would get the rtf1345 input method which probably doesn't work (w32) or maybe you don't want. Ed.