[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: |
Zhang Haijun |
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 14:08:46 +0000 |
On 11/05/2018 05:39 PM, Phil Sainty wrote:
> 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
>
I don't know the specific char to search. As the orignal problem I met,
I opened the text file. Emacs can't decode it and it didn't show any
warning message like position of the null byte. Then what should I do to
find the null byte(or other bytes which can prevent emacs from decoding)?
How to search these unknown bytes?
- 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Zhang Haijun, 2018/11/04
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Eli Zaretskii, 2018/11/04
- Message not available
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Eli Zaretskii, 2018/11/04
- Message not available
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Eli Zaretskii, 2018/11/04
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Zhang Haijun, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Zhang Haijun, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Zhang Haijun, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Phil Sainty, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Stephen Berman, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer,
Zhang Haijun <=
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Stephen Berman, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Eli Zaretskii, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Zhang Haijun, 2018/11/05
- Re: 26.1.50; Emacs can't decode the text file on opening the file, but can decode it on revert-buffer, Eli Zaretskii, 2018/11/05