From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: `grep' command on MS Windows with Cygwin, looking for text with Unicode chars Date: Wed, 13 Jun 2018 20:40:39 +0200 Message-ID: <877en2edi0.fsf@telefonica.net> References: <356e7bf9-3f93-448c-a067-f6b567d5aa5a@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528915206 9740 195.159.176.226 (13 Jun 2018 18:40:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2018 18:40:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 13 20:40:02 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTAgc-0002Qt-17 for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jun 2018 20:40:02 +0200 Original-Received: from localhost ([::1]:36320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTAii-0006A9-VQ for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jun 2018 14:42:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTAhS-0005jc-HS for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 14:40:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTAhO-00020f-7j for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 14:40:54 -0400 Original-Received: from [195.159.176.226] (port=36429 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTAhO-0001wJ-0U for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 14:40:50 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fTAfC-0000hN-2W for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 20:38:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:C1HrgWOt2fNiJEojL1/5dj2tRuU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117141 Archived-At: Drew Adams writes: > Is there a simple way to use `M-x grep' (e.g., giving it > some switches or escape chars or replacing them with hex > escapes or...) to search for some text that includes > non-ASCII Unicode chars? > > [I'm using (an old) Cygwin `grep'. Dunno whether that > matters.] > > I tried to look for "'%s'" (curly-quote) in the Emacs > source code. > > E.g., in `info.el' we now have this: > (format "Index for '%s'" string) instead of this: > (format "Index for `%s'" string) > > I wanted to see if this kind of change was spread to > other files. > > I tried things like "\\x2018%s\\x2019", with no luck. > Is there a simple approach that uses only `M-x grep' > and not, say, piping the result of iconv to grep? > > I ended up doing the search using Icicles, but I'd > like to be able to do such a search also using > just `grep' (or `rgrep' etc.). If there is a method, I'll like to know as well. This is the main reason why I don't use Unicode in my source files. (I investigated the matter the last year, on this ml and on the Internet. My conclusion was negative, at least for UTF-8).