From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: What does Emacs on w32 know that grep can't figure out? Date: Fri, 1 Oct 2010 01:58:38 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1285891180 17735 80.91.229.12 (30 Sep 2010 23:59:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Sep 2010 23:59:40 +0000 (UTC) Cc: Emacs-Devel devel To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 01 01:59:39 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1T2J-0003uM-4B for ged-emacs-devel@m.gmane.org; Fri, 01 Oct 2010 01:59:39 +0200 Original-Received: from localhost ([127.0.0.1]:42504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1T2I-0001NM-Hk for ged-emacs-devel@m.gmane.org; Thu, 30 Sep 2010 19:59:38 -0400 Original-Received: from [140.186.70.92] (port=38151 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1T27-0001NE-Ln for emacs-devel@gnu.org; Thu, 30 Sep 2010 19:59:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P1T1z-0001y9-PX for emacs-devel@gnu.org; Thu, 30 Sep 2010 19:59:27 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:37501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P1T1z-0001y3-N4 for emacs-devel@gnu.org; Thu, 30 Sep 2010 19:59:19 -0400 Original-Received: by yxk8 with SMTP id 8so1462499yxk.0 for ; Thu, 30 Sep 2010 16:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=LxnsmCtP/5ZpHtZdFC67jf+rMrPbaa36lWV/KyPrTl0=; b=BPSyt2puKUhM1deBJKcMIGiRQZoGJczKGTa6YOovDnGPnUUAW2oEicC6SYR+3zfrVZ oTaVp9iB7DB2Sp01mPX26fOZoHceDqWDZlApuE5+aObV1JScux8GKHux+muKvgqrxug+ srgQT5xWVCbIC9g0u3WVO0/IwMCEp97xChqPQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=vaB0Lx+Y292a97eFHurTdOWux8t9uUyy5kYT0I9EjbNaCjqbCVbLGg0WPykLeETltP yIRd3EpRDjR152bTWHXLZcEooGTwDQ8HLyFHOaT4Fp99Xu/lVL7EbC9OfsniE/jv2Tsx z8XI54eivTsfvaRDnEOgAWzFmqD2fZRIFYR34= Original-Received: by 10.90.99.1 with SMTP id w1mr766517agb.171.1285891158487; Thu, 30 Sep 2010 16:59:18 -0700 (PDT) Original-Received: by 10.90.9.34 with HTTP; Thu, 30 Sep 2010 16:58:38 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131110 Archived-At: > 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). > =C2=A0Its value is > =C2=A0utf-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 f iso-latin-1-unix then save. =C2=A0 =C2=A0 Juanma