emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 26.1.50; Emacs can't decode the text file on opening the file, but c


From: Eli Zaretskii
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
User-agent: K-9 Mail for Android

On November 4, 2018 10:44:36 AM GMT+02:00, Zhang Haijun <address@hidden> wrote:
> I have sent a bug report mail to address@hidden, but didn't 
> receive the bug number mail. So I send it here.
> 
> I put the attachment file to:
> http://119.37.194.6/upload/tmp/emacs-26.txt
> 
> 
> Following is the bug report mail:
> 
> Open the attachment text file with "emacs -Q". There are many 
> unrecognized chars(like \342\200\230). Following is the encoding info
> of 
> the buffer.
> 
> -------------------------------------------------
> = -- no-conversion (alias: binary)
> 
> Do no conversion.
> 
> 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.
> Type: raw-text (text with random binary characters)
> EOL type: LF
> --------------------------------------------------
> 
> But if I run the command revert-buffer, then there is no unrecognized 
> chars. Encoding info of the buffer becomes:
> 
> ---------------------------------------------------
> U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)
> 
> 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.
If you don't like this, set inhibit-null-byte-detection to a non-nil value.

This is not a bug, but the intended behavior.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]