From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer Date: Mon, 5 Nov 2018 22:39:45 +1300 Message-ID: <492691df-5413-2f32-e9dc-8fe2ec6ccb14@orcon.net.nz> References: <16B3CA28-C893-4854-AD64-1C224C1EDDB2@outlook.com> <83efc0ew3f.fsf@gnu.org> <83bm74epfj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1541410724 12291 195.159.176.226 (5 Nov 2018 09:38:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2018 09:38:44 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: Eli Zaretskii , "emacs-devel@gnu.org" To: Zhang Haijun Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 05 10:38:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJbLD-000375-Pa for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2018 10:38:39 +0100 Original-Received: from localhost ([::1]:34173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJbNK-0001ub-CP for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2018 04:40:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJbMQ-0001tH-QO for emacs-devel@gnu.org; Mon, 05 Nov 2018 04:39:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJbMM-00048B-Lr for emacs-devel@gnu.org; Mon, 05 Nov 2018 04:39:54 -0500 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:58445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJbMM-00039k-7R; Mon, 05 Nov 2018 04:39:50 -0500 Original-Received: from [150.107.172.101] (port=50167 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1gJbMH-00010c-9a; Mon, 05 Nov 2018 22:39:45 +1300 In-Reply-To: Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 60.234.4.34 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231022 Archived-At: On 5/11/18 10:00 PM, Zhang Haijun wrote: > On 11/05/2018 01:13 AM, Eli Zaretskii wrote: >> They are not invalid bytes, they are zero bytes. You can search for >> them like this: >> >> C-s C-q C-SPC > > I mean chars like ^@, ^H and \342\200\230. How to search them? ^@ is the null char and Eli just showed you how to search for it. Similarly, C-s C-q C-h will search for a ^H char. Assuming \342\200\230 is three octal characters then, I would probably resort to editing the search string and using `insert-char': C-s M-e C-x 8 RET #o342 RET etc... If you can *see* an instance of the character already, you might just move point to that character and use C-s C-w (and maybe a bit of C-M-w if that grabs too many chars). Or if you mean "any non-ascii character" then the regexp [^[:ascii:]] will match those. -Phil