From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii 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: Sun, 04 Nov 2018 11:18:53 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541323021 27001 195.159.176.226 (4 Nov 2018 09:17:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2018 09:17:01 +0000 (UTC) User-Agent: K-9 Mail for Android To: emacs-devel@gnu.org, Zhang Haijun , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 04 10:16:57 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 1gJEWf-0006w8-3o for ged-emacs-devel@m.gmane.org; Sun, 04 Nov 2018 10:16:57 +0100 Original-Received: from localhost ([::1]:58140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJEYl-0008RI-Fn for ged-emacs-devel@m.gmane.org; Sun, 04 Nov 2018 04:19:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJEYf-0008RC-4Z for emacs-devel@gnu.org; Sun, 04 Nov 2018 04:19:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJEYb-0007zR-EM for emacs-devel@gnu.org; Sun, 04 Nov 2018 04:19:00 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJEYb-0007ys-7w; Sun, 04 Nov 2018 04:18:57 -0500 Original-Received: from [109.253.214.197] (port=36785 helo=[10.132.9.58]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1gJEYa-0003cS-NA; Sun, 04 Nov 2018 04:18:57 -0500 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:231001 Archived-At: On November 4, 2018 10:44:36 AM GMT+02:00, Zhang Haijun wrote: > I have sent a bug report mail to bug-gnu-emacs@gnu=2Eorg, but didn't=20 > receive the bug number mail=2E So I send it here=2E >=20 > I put the attachment file to: > http://119=2E37=2E194=2E6/upload/tmp/emacs-26=2Etxt >=20 >=20 > Following is the bug report mail: >=20 > Open the attachment text file with "emacs -Q"=2E There are many=20 > unrecognized chars(like \342\200\230)=2E Following is the encoding info > of=20 > the buffer=2E >=20 > ------------------------------------------------- > =3D -- no-conversion (alias: binary) >=20 > Do no conversion=2E >=20 > When you visit a file with this coding, the file is read into a > unibyte buffer as is, thus each byte of a file is treated as a > character=2E > Type: raw-text (text with random binary characters) > EOL type: LF > -------------------------------------------------- >=20 > But if I run the command revert-buffer, then there is no unrecognized=20 > chars=2E Encoding info of the buffer becomes: >=20 > --------------------------------------------------- > U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix) >=20 > UTF-8 (no signature (BOM)) > Type: utf-8 (UTF-8: Emacs internal multibyte form) > EOL type: LF > This coding system encodes the following charsets: > unicode > --------------------------------------------------- This file includes null bytes, which by default cause Emacs to disable all= decoding, because such files are deemed to be binary files=2E If you don't like this, set inhibit-null-byte-detection to a non-nil value= =2E This is not a bug, but the intended behavior=2E