From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YUE Daian Newsgroups: gmane.emacs.help Subject: Re: Grep Japanese characters Date: Fri, 13 Jul 2018 10:58:41 +0800 Message-ID: <87y3ef265a.fsf@yue-d-PC.i-did-not-set--mail-host-address--so-tickle-me> References: <20180712.080255.586725992291613595.tkk@misasa.okayama-u.ac.jp> <83a7qxfa7r.fsf@gnu.org> <87d0vt2lxj.fsf@yue-d-PC.i-did-not-set--mail-host-address--so-tickle-me> <86pnzsbnvu.fsf@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531450638 28035 195.159.176.226 (13 Jul 2018 02:57:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2018 02:57:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 13 04:57:14 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 1fdoGg-00079R-B7 for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jul 2018 04:57:14 +0200 Original-Received: from localhost ([::1]:34966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdoIl-0005ej-MG for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 22:59:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdoIE-0005eS-T6 for help-gnu-emacs@gnu.org; Thu, 12 Jul 2018 22:58:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdoIA-0004NV-Vu for help-gnu-emacs@gnu.org; Thu, 12 Jul 2018 22:58:50 -0400 Original-Received: from mail-pl0-x22c.google.com ([2607:f8b0:400e:c01::22c]:37207) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdoIA-0004NO-P2 for help-gnu-emacs@gnu.org; Thu, 12 Jul 2018 22:58:46 -0400 Original-Received: by mail-pl0-x22c.google.com with SMTP id 31-v6so11516647plc.4 for ; Thu, 12 Jul 2018 19:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=JdjCANC+2ty1m7GkeEE2+cyY9ECqSAbU8QQTJeQeUGE=; b=luJpybXz24q1+rvUPxtXHSpKV7nt8V5qWi8JtlWiLf2aSZ4cZr2w393zQoG9Bb006n ZmCdld2//f5gNKYCG9FVfeVjrf9199lhp3CSi0xyOGL4YV2Nuz/UAXoBDDx+z5FfeBy0 YL7nAxMW6CQ2EYuVKNH7eg7mtXDkqWES9fN2SxV2LDQIqO/E74BR404fK4Z+bDcnGSvV iaYZO/VVVZKeGofZWxGHF0ohkoS/6HOZqcWF7ngQX7dakgm1PMmn/6aWTGcykdoqozC5 4dsbNMkosbRX9vk1wgfJ2hMKt3NvzIL7PUxwCGfaJLOzQVAgftQ4xb0Cri0Tf5nk82Ab lKfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=JdjCANC+2ty1m7GkeEE2+cyY9ECqSAbU8QQTJeQeUGE=; b=G3BmfHvwb9ODGsHxaDstkRpxDRjyAw7ynR7FZIBaEH8HOwqfTkfefmhkykF/LEjihK 1kfuBKsuij16cb2adxNoXLI1Xb4nny88edNYJgg6p+RwLr8FPdhX8yKZDwTKqsh73qXU yXGL0HjJE/hLdPD4bv8Klh7jzbLUmCaN1S4PgY38DCadkqiwc/dzfyIMKaWVz9N7tUuu l4ha3+rL91cngqgxspjfLcobFrYE/rLOV7eHoMZwPJWqE/Jjne9T4OSL41Kc7p+ytZar KGbrFNExdO37w7/iLLXUSOjWjYRA5yi13AiS0I70/MeBSaL9ByKYxkPX7tylxHqziHxf ipkw== X-Gm-Message-State: AOUpUlHRNcJQNOwxoV0N5Y9OZzwDNcoFxMDwzhrcrKd58Z9vqIsfy5CW HErNwKZs4uieIPdxdDxjZbMEeOCY X-Google-Smtp-Source: AAOMgpf+7Lixev1fjhGH9S/A9r2naMHMm2qQrMz/dQOilD005XSKqBT7Dx0bG8d7oqBeJ4Z94h2uZg== X-Received: by 2002:a17:902:2887:: with SMTP id f7-v6mr3744998plb.150.1531450725441; Thu, 12 Jul 2018 19:58:45 -0700 (PDT) Original-Received: from localhost ([118.201.58.126]) by smtp.gmail.com with ESMTPSA id a191-v6sm21139147pge.45.2018.07.12.19.58.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 19:58:44 -0700 (PDT) In-Reply-To: <86pnzsbnvu.fsf@misasa.okayama-u.ac.jp> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::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:117419 Archived-At: On 2018-07-12 22:10, Tak Kunihiro wrote: >>>> 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? >>> >>> You cannot pass UTF-8 encoded parameters to sub-programs on >>> MS-Windows. You can only use the encoding of your system codepage. >>> Sorry, it's an MS-Windows limitation. >> >> I remember Windows 10 has a beta option to use UTF-8 for the whole >> system instead of your local encoding. > > I have checked a box on a dialog by following steps and > confirmed that I can grep Japanese string. > > Thank you for the hints! > > > Region & Language > -> Administrative language settings > -> Language for non-Unicode programs > -> Change system locale... > -> Beta: Use Unicode UTF-8 for worldwide language support I am glad it made sense. Just a reminder: If you select this button, you may find some local software that use hard-coded encoding do not show characters correctly. I personally do not care because Windows to me is only a game center anyway.