From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: What does Emacs on w32 know that grep can't figure out? Date: Sun, 03 Oct 2010 12:39:05 +0200 Organization: ThierryVolpiatto Message-ID: <87aamvo912.fsf@tux.homenetwork> References: <87bp7d1o6k.fsf@catnip.gol.com> <83bp7dqcgu.fsf@gnu.org> <87mxqw28cv.fsf@tux.homenetwork> <87mxqw4oup.fsf@tux.homenetwork> <83ocbcpqif.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1286103131 25911 80.91.229.12 (3 Oct 2010 10:52:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2010 10:52:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 03 12:52:10 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 1P2MAr-0006fl-A7 for ged-emacs-devel@m.gmane.org; Sun, 03 Oct 2010 12:52:09 +0200 Original-Received: from localhost ([127.0.0.1]:47919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2MAq-0006jr-Me for ged-emacs-devel@m.gmane.org; Sun, 03 Oct 2010 06:52:08 -0400 Original-Received: from [140.186.70.92] (port=39214 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2M03-00019j-Ud for emacs-devel@gnu.org; Sun, 03 Oct 2010 06:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2Lzu-0004IM-Oh for emacs-devel@gnu.org; Sun, 03 Oct 2010 06:40:59 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:34413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2Lzu-0004HQ-Dt for emacs-devel@gnu.org; Sun, 03 Oct 2010 06:40:50 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P2Lzq-000440-FS for emacs-devel@gnu.org; Sun, 03 Oct 2010 12:40:46 +0200 Original-Received: from 231.211.85-79.rev.gaoland.net ([79.85.211.231]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Oct 2010 12:40:46 +0200 Original-Received: from thierry.volpiatto by 231.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Oct 2010 12:40:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 231.211.85-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux) Cancel-Lock: sha1:EzmEhlgIwYWbipp0sZGfO6utCvI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:131281 Archived-At: Lennart Borgman writes: > On Sat, Oct 2, 2010 at 5:56 PM, Lennart Borgman > wrote: >> On Sat, Oct 2, 2010 at 5:23 PM, Eli Zaretskii wrote: >>>> From: Thierry Volpiatto >>>> Date: Sat, 02 Oct 2010 17:05:18 +0200 >>>> Cc: emacs-devel@gnu.org >>>> >>>> > Based on your advice I just took the trouble to install powershell. I >>>> > can not see that it addresses the problem with utf-16, but maybe I am >>>> > missing something. Can you please tell me how to search also utf-16 >>>> > files with it? >>>> >>>> That's just an idea i sent, i personally don't use (or really few >>>> sometimes on other machines) windows systems and i have just a basic >>>> knowledge of all that is related to it and microsoft in general (e.g Powershell). >>>> So i can't help you much here. >>>> Anyway, Eli seem to have tried it and is not convinced. >>> >>> Looks like the PowerShell cmdlet that's supposed to be equivalent of >>> Grep is Select-String. >> >> Yes, thanks. And that actually works with utf-16. >> >> So now we have a strange situation. > > > Or maybe not. Looking at the documentation for Select-String here > > http://technet.microsoft.com/en-us/library/dd315403.aspx > > it does not look as it autodetects the coding system in the file. > > It does not even say it can handle utf-16, or at least I can't find > it. Maybe someone who understands this better can see it there? Can you try to use FINDSTR from command line (it work from eshell) and tell me if that work on your utf-16 files? (It seem this command is not part of powershell) I wrote some code that use this command with success on windows (with anything). That would allow to have a decent grep that work on windows without having to install external programs. Even if that seem not powerfull as grep for regexps, that provide a default grep command better than "grep command not found". -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997