From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: how to find encoding violations in Emacs buffer? Date: Wed, 13 Dec 2006 06:26:32 +0200 Message-ID: References: <1165947493.201071.294760@l12g2000cwl.googlegroups.com> NNTP-Posting-Host: dough.gmane.org X-Trace: sea.gmane.org 1165984018 24394 80.91.229.10 (13 Dec 2006 04:26:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2006 04:26:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 13 05:26:56 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 1GuLhn-0001X7-UH for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Dec 2006 05:26:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuLhn-0003GV-B1 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Dec 2006 23:26:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuLha-0003DV-4s for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 23:26:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuLhX-0003Cn-Mg for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 23:26:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuLhX-0003Ck-Hf for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 23:26:39 -0500 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GuLhX-0003s3-DD for help-gnu-emacs@gnu.org; Tue, 12 Dec 2006 23:26:39 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-56-152.inter.net.il [80.230.56.152]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id BGE94385 (AUTH halo1); Wed, 13 Dec 2006 06:26:30 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: <1165947493.201071.294760@l12g2000cwl.googlegroups.com> (riccardo.murri@gmail.com) 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:39495 Archived-At: > From: riccardo.murri@gmail.com > Date: 12 Dec 2006 10:18:13 -0800 > > 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? Emacs 22 already shows the problematic characters. Please look closer at the text of the buffer where Emacs tells you why it needs your decision about the encoding.