From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Riccardo Murri" Newsgroups: gmane.emacs.help Subject: Re: how to find encoding violations in Emacs buffer? Date: Tue, 12 Dec 2006 21:56:32 +0100 Message-ID: <1c34ba170612121256w79f67512u75db458691ebcc3f@mail.gmail.com> References: <1165947493.201071.294760@l12g2000cwl.googlegroups.com> <457F1399.3040008@student.lu.se> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166000666 1534 80.91.229.10 (13 Dec 2006 09:04:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2006 09:04:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 13 10:04:25 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuQ2J-0002aS-BV for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Dec 2006 10:04:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuQ2I-0007vC-R6 for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Dec 2006 04:04:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuEg2-00027k-Ft for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 15:56:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuEg0-00026A-RD for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 15:56:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuEg0-000264-N6 for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 15:56:36 -0500 Original-Received: from [64.233.162.232] (helo=nz-out-0102.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GuEfy-0004WF-KD for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 15:56:35 -0500 Original-Received: by nz-out-0102.google.com with SMTP id r28so1034903nza for ; Tue, 12 Dec 2006 12:56:32 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RsEIQE+bzEAxuxMCpOZfn4eURF3EC2RSgPUVhIHNqNsGccSSmOm292yZxpWjug/4tAY1XwwbhFlS4zoQoAxSJlaocSTz0seOwmjIa16UORTzxyQ9Nuv4PeTrkmWnOiOis9CNjYv4ick8cNqhLdTJTjl5jaF+PmWVseDraa++xg4= Original-Received: by 10.64.131.4 with SMTP id e4mr13925616qbd.1165956992055; Tue, 12 Dec 2006 12:56:32 -0800 (PST) Original-Received: by 10.65.158.6 with HTTP; Tue, 12 Dec 2006 12:56:31 -0800 (PST) Original-To: "Lennart Borgman" In-Reply-To: <457F1399.3040008@student.lu.se> Content-Disposition: inline X-Mailman-Approved-At: Wed, 13 Dec 2006 04:02:46 -0500 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 Xref: news.gmane.org gmane.emacs.help:39500 Archived-At: On 12/12/06, Lennart Borgman wrote: > riccardo.murri@gmail.com wrote: > > Hello, > > > > from time to time, a buffer gets some spurious character in and Emacs > > refuses to save it in the correct encoding. So I am presented with the > > choice of other different encodings. > > > > However, in most of the cases, I know that the file *should* be UTF-8 > > encoded. So I would rather like to find out where the offending > > character is and correct it, instead of choosing a different encoding. > > > > Is there any function/package/elisp hack to find/highlight characters > > in a buffer that Emacs could not encode as UTF-8? > > > > I think someone said there was, but I have never seen it though I have > had these problem quite often. Can't remember the details now. > > Which platform are you on? I am using MS Windows (2000 or XP). > Debian (etch) GNU/Linux, running emacs-snapshot-gtk, 22.0.90 Does the platform matter in this case? I would have thought the elisp interface hides those details... Riccardo