From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#14985: 24.3; rgrep and accents Date: Tue, 30 Jul 2013 19:10:35 +0300 Message-ID: <8338qwxc3o.fsf@gnu.org> References: <86ppu0t88a.fsf@somewhere.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1375200684 16728 80.91.229.3 (30 Jul 2013 16:11:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jul 2013 16:11:24 +0000 (UTC) Cc: 14985@debbugs.gnu.org To: Sebastien Vauban Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 30 18:11:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4CW7-0003pm-Ci for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 18:11:19 +0200 Original-Received: from localhost ([::1]:42338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4CW6-0003hF-Uz for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 12:11:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4CVx-0003bn-OZ for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 12:11:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4CVq-0006vN-Jx for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 12:11:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4CVq-0006vJ-GA for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 12:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V4CVp-00027I-V3 for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 12:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jul 2013 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14985-submit@debbugs.gnu.org id=B14985.13752006388094 (code B ref 14985); Tue, 30 Jul 2013 16:11:01 +0000 Original-Received: (at 14985) by debbugs.gnu.org; 30 Jul 2013 16:10:38 +0000 Original-Received: from localhost ([127.0.0.1]:58638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4CVR-00026R-RJ for submit@debbugs.gnu.org; Tue, 30 Jul 2013 12:10:38 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:51519) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4CVN-000261-Sx for 14985@debbugs.gnu.org; Tue, 30 Jul 2013 12:10:35 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MQR00I00BH10C00@a-mtaout20.012.net.il> for 14985@debbugs.gnu.org; Tue, 30 Jul 2013 19:10:26 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MQR00HF9BLDT460@a-mtaout20.012.net.il>; Tue, 30 Jul 2013 19:10:26 +0300 (IDT) Sun-Java-System-SMTP-Warning: Lines longer than SMTP allows found and truncated. In-reply-to: <86ppu0t88a.fsf@somewhere.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76821 Archived-At: > 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é' 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 \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o \! -type d \( -name .\#\* -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.bak -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 \*.wx32fsl - > > 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).