[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What does Emacs on w32 know that grep can't figure out?
From: |
Juanma Barranquero |
Subject: |
Re: What does Emacs on w32 know that grep can't figure out? |
Date: |
Fri, 1 Oct 2010 01:58:38 +0200 |
> This file is maybe a text file, maybe not.
It's a text file, but not ASCII. It's encoded as Emacs is telling you:
utf-16, with signature, in little-endian order (it starts with FF FE).
> Its value is
> utf-16le-with-signature-unix
Curious. I get utf-16le-with-signature-dos, consistent with the file
having CRLF (which it does).
> However trying to search this file from a cmd prompt with (gnuwin32)
> grep does not work. And it does not work with cygwin grep either. They
> think it is a binary file
It is. This is unrelated to Emacs. The grep tools you're using do not
support utf-16 text.
> (even though I changed the line delimiter to unix style).
Ah, that explains the -unix above.
> What is going on?
I hope this is clearer now.
> Is grep sometimes useless on w32 now, or?
It will be useless whenever you try to grep a file in a coding system
the grep tool does not support...
> (How do we
> handle that in Emacs?)
How do we handle what? If you mean, how can Emacs read the text just
fine... Emacs has supported UTF-16 and many other coding systems for
years.
As for what can you do,
C-x <RET> f iso-latin-1-unix <RET>
then save.
Juanma
- What does Emacs on w32 know that grep can't figure out?, Lennart Borgman, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?,
Juanma Barranquero <=
- Re: What does Emacs on w32 know that grep can't figure out?, Lennart Borgman, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?, Juanma Barranquero, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?, Lennart Borgman, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?, Juanma Barranquero, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?, Lennart Borgman, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?, Juanma Barranquero, 2010/09/30
- Re: What does Emacs on w32 know that grep can't figure out?, PJ Weisberg, 2010/09/30