From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: How to find the character breaking the file encoding? Date: Sat, 08 Feb 2020 12:36:22 +0100 Message-ID: <87d0apwbt5.fsf@mbork.pl> References: <87a75yxc5q.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="31189"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 08 12:37:13 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j0OQD-00082s-6i for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 12:37:13 +0100 Original-Received: from localhost ([::1]:40194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0OQC-0002g8-5g for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 06:37:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50052) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0OPn-0002fq-Rl for help-gnu-emacs@gnu.org; Sat, 08 Feb 2020 06:36:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0OPk-0006HP-8y for help-gnu-emacs@gnu.org; Sat, 08 Feb 2020 06:36:47 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:53126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0OPk-0006AE-2b for help-gnu-emacs@gnu.org; Sat, 08 Feb 2020 06:36:44 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 4DC99E62D8; Sat, 8 Feb 2020 12:36:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dGJ4eBpPT7-R; Sat, 8 Feb 2020 12:36:30 +0100 (CET) Original-Received: from localhost (jeden09-dwa27.echostar.pl [213.156.109.227]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 8BC3AE62D4; Sat, 8 Feb 2020 12:36:30 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122374 Archived-At: On 2020-02-05, at 04:09, Stefan Monnier wrote: >> inserted a non-UTF-8 sequence of bytes there. Is there any way Emacs >> can help me finding it (other than me manually bisecting the file until >> I find the offending place)? > > I think you can do: > > C-x RET r utf-8 RET > > to force reading it as utf-8. And then > > C-x C-s > > should complain about the problematic element with a buffer that shows > you the offender and lets you click on it to jump to its location. Thanks Stefan and =C3=93scar. Before you answered me, I killed the buffer and visited the file again, and the problem disappeared. Go figure... Thanks, --=20 Marcin Borkowski http://mbork.pl