From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.help Subject: Grep Japanese characters Date: Thu, 12 Jul 2018 08:02:55 +0900 (JST) Message-ID: <20180712.080255.586725992291613595.tkk@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1531351644 9734 195.159.176.226 (11 Jul 2018 23:27:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2018 23:27:24 +0000 (UTC) Cc: tkk@misasa.okayama-u.ac.jp To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 12 01:27:20 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 1fdOVw-0002NO-LV for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 01:27:16 +0200 Original-Received: from localhost ([::1]:55794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdOY3-0005Nx-Gg for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jul 2018 19:29:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdOXa-0005Nm-5h for help-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:28:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdOXX-0007RP-2r for help-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:28:58 -0400 Original-Received: from mxl069v64.mxlogic.net ([208.81.69.64]:28712 helo=s18p02o141.mxlogic.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fdOXW-0007ME-Ce for help-gnu-emacs@gnu.org; Wed, 11 Jul 2018 19:28:54 -0400 Original-Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s18p02o141.mxlogic.net(mxl_mta-8.5.0-1964) with ESMTP id 6b2964b5.7ff0057fb700.221500.00-539.405810.s18p02o141.mxlogic.net (envelope-from ); Wed, 11 Jul 2018 17:28:54 -0600 (MDT) X-MXL-Hash: 5b4692b60eb5b170-6adb36273c1b7f7b1a28357c1245ed2ad5125f36 Original-Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s18p02o141.mxlogic.net(mxl_mta-8.5.0-1964) over TLS secured channel with ESMTP id 2ac864b5.0.221128.00-383.405092.s18p02o141.mxlogic.net (envelope-from ); Wed, 11 Jul 2018 17:02:59 -0600 (MDT) X-MXL-Hash: 5b468ca3450ea069-78ed63a01e8f4c44c7997f658fa31df323349860 Original-Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 52b2_a4ae_91211f97_9765_4969_bd15_bc22b7f7f40c; Thu, 12 Jul 2018 08:02:56 +0900 Original-Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 1AF944C0B2E; Thu, 12 Jul 2018 08:02:56 +0900 (JST) X-Mailer: Mew version 6.8 on Emacs 26.1 X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6327=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6327> : inlines <6747> : streams <1792275> : uri <2672211> X-AnalysisOut: [v=2.2 cv=IOdyMknG c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=ZPSk82zQDygA:10 a=R9Q] X-AnalysisOut: [F1RCXAYgA:10 a=wF_h-k23IXg_6yi1W-YA:9 a=UAVRJdkkkM0A:10] X-Spam: [F=0.5000000000; CM=0.500; MH=0.500(2018071112); S=0.248(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 208.81.69.64 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:117403 Archived-At: I want to grep Japanese string. I can do it on Emacs for Mac but cannot do it on Emacs for MS Windows. I found that I can grep Japanese string using c:/msys64/usr/bin/grep.exe on command prompt (outside of Emacs). However, I cannot do it using c:/msys64/usr/bin/grep.exe on command prompt by M-x shell (inside of Emacs). I confirm that LC_ALL is set to en_US.UTF-8 on both environments. Can you give me a hint to grep Japanese string on Emacs for MS Windows? CMD> set ... LC_ALL=en_US.UTF-8 ... CMD> c:/msys64/usr/bin/cat hello.txt Hello is こんにちは in Japanese. Hello is bonjour in French. CMD> c:/msys64/usr/bin/grep.exe Hello hello.txt Hello is こんにちは in Japanese. Hello is bonjour in French. CMD> c:/msys64/usr/bin/grep.exe "こんにちは" hello.txt Hello is こんにちは in Japanese. CMD> c:/emacs-26.1/bin/runemacs -Q M-x shell CMD> set ... LC_ALL=en_US.UTF-8 ... CMD> c:/msys64/usr/bin/grep.exe Hello hello.txt c:/msys64/usr/bin/grep.exe Hello hello.txt Hello is こんにちは in Japanese. Hello is bonjour in French. CMD> c:/msys64/usr/bin/grep.exe "こんにちは" hello.txt c:/msys64/usr/bin/grep.exe "こんにちは" hello.txt