From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: `grep' command on MS Windows with Cygwin, looking for text with Unicode chars Date: Wed, 13 Jun 2018 15:16:10 -0400 Message-ID: References: <356e7bf9-3f93-448c-a067-f6b567d5aa5a@default> <877en2edi0.fsf@telefonica.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1528917274 18530 195.159.176.226 (13 Jun 2018 19:14:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2018 19:14:34 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 13 21:14:30 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 1fTBDw-0004jp-QJ for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jun 2018 21:14:28 +0200 Original-Received: from localhost ([::1]:36477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTBG3-00017Q-VA for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jun 2018 15:16:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTBFc-000171-Lw for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 15:16:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTBFb-00024N-DM for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 15:16:12 -0400 Original-Received: from mail-ot0-x22c.google.com ([2607:f8b0:4003:c0f::22c]:44309) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTBFb-00023C-7I for help-gnu-emacs@gnu.org; Wed, 13 Jun 2018 15:16:11 -0400 Original-Received: by mail-ot0-x22c.google.com with SMTP id w13-v6so4243563ote.11 for ; Wed, 13 Jun 2018 12:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Jr8Dn9dcdAm7sSPA4diAixDdbrGCCxdcqWu9B7X/jLc=; b=kd39qkY9lu6VDQc3iinNr4/BJmtI9dJDN2+rphWXiYOP6KltUlC+nD8pPh9RvKc1IB FDgwExZYNdf8rOmuPx3AGxik+H+7QzQyGGHN3Yj9nrdqH1IkLtXhC6qG9zSsR9wHX0jP kUjzvo9Wc8ly/gmPBqBuRzechihEEtzAewkgHXhmjM+IKzpmrLy1DpHepDjHu3hH1qMG mYtXipJuHe38QGwtkXkbo0RZjDbAraq3HR07KfwZzvQBTRLuGkD3LnEkOTgIkMe6xbyZ 3iawEaau13Ou+Ykw+AN9V9KXGAiVw5e+3nZtG3+WutCn0gvMBabfymFRNrj+UqQUxMI1 slwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Jr8Dn9dcdAm7sSPA4diAixDdbrGCCxdcqWu9B7X/jLc=; b=cIuHNu7KPiLar8oVGXrf1AZM7HKQYpTY4tvF+EO/Ll1AV7Sdo0+8CjFFoWwvyktqjy KdcBbf1vYRmx9+egNkEBcTQ+i9mc5PvVKLm9e/SXyc+BtDqOd5gLrKLCw8VNjplCUFbp H1rABHgynwuiHm48oJrbKG6fKBNqn+z4ugXGqMEcp6Ro5ElHI+Vm3Y+b4j8azhAQx9lR Daj9uosdfAGTgf25oAclT4sjn8SJOKFHqRqt5PRXlOduRDNtyaGgjDupslXjB/48Hx3W RxisVRWIVHNHjIOnzqCzFAfXBvVzpNw528ks3hWxVuGX5+MFpyEfAXz4FieQbnSMpwAQ STUg== X-Gm-Message-State: APt69E3EkS4jkDqO0usQ4cubV0L2LvQbfsoOb2HxAMOJzLQ9ZNy8vzEk G5YHs3jL4n7vyJMF7PfVVcsITWslokE1Nef0kCg= X-Google-Smtp-Source: ADUXVKLeOPnGfIPjG24eu8bRc6YyHJQ1crhuzYTzg8k4Oz68etfJJnqjlwuE1Dop86gA6yByYRMFkzIXACIuhsfu/nc= X-Received: by 2002:a9d:3851:: with SMTP id r17-v6mr3647394otd.335.1528917370612; Wed, 13 Jun 2018 12:16:10 -0700 (PDT) Original-Received: by 2002:a4a:3b84:0:0:0:0:0 with HTTP; Wed, 13 Jun 2018 12:16:10 -0700 (PDT) In-Reply-To: <877en2edi0.fsf@telefonica.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::22c 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:117144 Archived-At: On 13 June 2018 at 14:40, =C3=93scar Fuentes wrote: > 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? > 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. This seems to do the right with thing with the grep I have installed: grep "[^[:cntrl:][:print:]]" *.el According to the GNU grep manual [:cntrl:][:print:] looks equivalent to Emacs' [:ascii:], in the C locale. The grep I have installed doesn't seem to support anything but the C locale anyway (at least, setting LANG isn't needed). It identifies itself in the --help output as: GNU grep version 2.0d Win32 port with subdirectory search created by Tim Charron (full source available at http://www.interlog.com/~tcharron/grep.html) That web page indicates it's from 2001, but works well enough that I've never bothered to change it. Not sure how Cygwin grep would act.