From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#14985: 24.3; rgrep and accents Date: Thu, 26 Sep 2019 14:51:10 +0200 Message-ID: References: <86ppu0t88a.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="177333"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Sebastien Vauban , 14985-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 26 14:52:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDTFr-000js5-WD for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2019 14:52:20 +0200 Original-Received: from localhost ([::1]:35510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDTFj-0004d8-N3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2019 08:52:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44033) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDTFc-0004YP-3L for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 08:52:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDTFa-0003zW-RR for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 08:52:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34091) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDTFa-0003zR-OA for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDTFa-0006xv-MF for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 08:52:02 -0400 In-Reply-To: <86ppu0t88a.fsf@somewhere.org> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Sep 2019 12:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 14985 X-GNU-PR-Package: emacs Mail-Followup-To: 14985@debbugs.gnu.org, stefan@marxist.se, sva-news@mygooglest.com Original-Received: via spool by 14985-done@debbugs.gnu.org id=D14985.156950228926723 (code D ref 14985); Thu, 26 Sep 2019 12:52:02 +0000 Original-Received: (at 14985-done) by debbugs.gnu.org; 26 Sep 2019 12:51:29 +0000 Original-Received: from localhost ([127.0.0.1]:42910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDTF3-0006wx-Be for submit@debbugs.gnu.org; Thu, 26 Sep 2019 08:51:29 -0400 Original-Received: from mail-pl1-f195.google.com ([209.85.214.195]:41170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDTF1-0006wl-MX for 14985-done@debbugs.gnu.org; Thu, 26 Sep 2019 08:51:28 -0400 Original-Received: by mail-pl1-f195.google.com with SMTP id t10so1034422plr.8 for <14985-done@debbugs.gnu.org>; Thu, 26 Sep 2019 05:51:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=TCRlDBNQODA23sjqT+G6ZGgj49r2VlI4UBXEnt9xMQk=; b=Eq+G78t6Tk4HlWiKQoYWUAx7mPIG/wvErMQb2stTv+piomVsgA3/RRtutx2quhJPJ5 jGoNkNSgKbUrGul3E8ZMNBB532wVUlJ20OKnmw/2/5LLi6rS2X6xx6olTcUlKEYlITgP Wqn4mJ25K1yQOwQXN2YC3LIRLqGcCjQ70u9j1xfiSZwcJc22HZ8ASJbzOZAztGIsrpwl yFa4EvG2I1cvpDRoNnwppyslj1WhE5QhvLacCAJMeDCXx0Vyfmp0iSjKU9ro1+Rng4JE TukI7uIsG+IYW/zdO6QgrkpueAKM0ILymHED6GfJo/Xu1ujdFrPJtRF52NzUkhrLJg12 vAJw== X-Gm-Message-State: APjAAAXLKcy641+4lpQzlcKiIaMd5HvIx/u4GDJqWqxhaacal5YK8Bn9 FndWzAHTtM7i4qrwcZFULdkfYeUnPF3S0FqS9r8= X-Google-Smtp-Source: APXvYqxsMxUjEZSx9UO2vnGZ9h8BIeaeQudVA3QNOoiY3HlhqAnSNShVf69COgbs0VM4IEX+l10C+u7WL1wiFyRDc6w= X-Received: by 2002:a17:902:d88f:: with SMTP id b15mr3516536plz.251.1569502281926; Thu, 26 Sep 2019 05:51:21 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167241 Archived-At: Eli Zaretskii writes: >> From: "Sebastien Vauban" >> Date: Tue, 30 Jul 2013 16:47:49 +0200 >> >> If I call the command `rgrep' for recursively searching for the string >> `Contrat sign=C3=A9' in some directory, I get "no matches found". >> >> --8<---------------cut here---------------start------------->8--- >> -*- mode: grep; default-directory: "~/some/dir/" -*- >> Grep started at Tue Jul 30 16:40:06 >> >> find . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path >> \*/MCVS -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.b= zr -o >> -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o \! -t= ype d >> \( -name .\#\* -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.b= ak -o >> -name \*.obj -o -name \*.map -o -name \*.ico -o -name \*.pif -o -name \*= .lnk >> -o -name \*.a -o -name \*.ln -o -name \*.blg -o -name \*.bbl -o -name \*= .dll >> -o -name \*.drv -o -name \*.vxd -o -name \*.386 -o -name \*.elc -o -name >> \*.lof -o -name \*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -= o >> -name \*.tfm -o -name \*.class -o -name \*.fas -o -name \*.lib -o -name = \*.mem >> -o -name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o= -name >> \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name \*.lx32fsl -o = -name >> \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl -o -name \*.fx32fsl -= o >> -name \*.sx64fsl -o -name \*.sx32fsl -o -name \*.wx64fsl -o -name \*.wx3= 2fsl - >> >> Grep finished with no matches found at Tue Jul 30 16:40:06 >> --8<---------------cut here---------------end--------------->8--- >> >> If I copy/paste the above (huge) `grep-find' command into a Cygwin (Zsh) >> shell, there it works... >> >> Without accents in the search expression, it works perfectly from Emacs, >> needless to say. > > There are too many unknowns here. > > You are mixing Cygwin tools with a native Windows Emacs, which is a > problem. AFAIK, Cygwin (at least its latest versions) uses UTF-8 to > encode non-ASCII characters, like many Posix platforms do, but > MinGW-compiled Emacs uses the system codepage to do that. > > In addition, Emacs does some non-trivial stuff when it invokes Cygwin > programs, and I think this misfires when non-ASCII characters are > involved. It's possible that you have rediscovered bug #6705, which > see. > > To unlock the mystery, I would suggest to find out what does Cygwin > Grep see in its argv[] array in your use case. One way to find that > out is to compile a simple Cygwin program that just dumps its argv[] > in some ASCII-safe encoding, and invoke it instead of Grep (or rename > it grep.exe for a moment). More information was requested 6 years ago, and the email address of the reporter is now bouncing. It's therefore unlikely that we'll be able to make any progress here and I'm closing the bug report. If anyone can reproduce the original issue, please reopen. Best regards, Stefan Kangas