From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Grep Japanese characters Date: Thu, 12 Jul 2018 12:05:51 +0700 Message-ID: References: <20180712.080255.586725992291613595.tkk@misasa.okayama-u.ac.jp> <83a7qxfa7r.fsf@gnu.org> 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 1531371874 550 195.159.176.226 (12 Jul 2018 05:04:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Jul 2018 05:04:34 +0000 (UTC) Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 12 07:04:29 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 1fdTmH-0008Vi-P0 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 07:04:29 +0200 Original-Received: from localhost ([::1]:57374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdToO-0001uK-Ri for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jul 2018 01:06:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdTnr-0001t2-M5 for help-gnu-emacs@gnu.org; Thu, 12 Jul 2018 01:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdTnq-00034F-S0 for help-gnu-emacs@gnu.org; Thu, 12 Jul 2018 01:06:07 -0400 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:41182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdTno-00032C-Cf; Thu, 12 Jul 2018 01:06:04 -0400 Original-Received: by mail-oi0-x235.google.com with SMTP id k12-v6so53458313oiw.8; Wed, 11 Jul 2018 22:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NALQmz3tKqGYw5N01wAmiIBI0JcvKKOorxB8FO1jm5Q=; b=ve+90mJzPYrgOvdD354PHB/xRRchYnhC1qjGoXTIvnm1lxrZ2OAfFuvtIxzXEq8jx0 w1jsEynEMATZYQoTSepIWWjHJ/gdA9dt/RoaqNrDCEEt2hlGLo4oVU4CDx+NrD5EIhqR X2v8Y9MKWMjTqCGbALW+tEE34OhE71bz32nykzvO8e4VqXB/bnUBCVIHCpficaJ+UZaE K9cjb8AfEb+FFFalHE7AZI/Td9h9kercgOMzctkvRS5vXPgEkgjoZTyQmr4R1mdRioyq fooDjZSa+tV0yLQZm2lBtfWbnyP0aoPBs/27SyPzrUeVFnsL9IPtkB5BqQY1J5gONphW dEug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=NALQmz3tKqGYw5N01wAmiIBI0JcvKKOorxB8FO1jm5Q=; b=mf1IVJ/tcpQ0TJ6HpI4o9vqdXjX2RwuzeCgXTDKT4Sk6yKKiTI0Z1rQa2p9y2jqIBu Dy5FjdzfjOZFwMVq08sXzs4O6zBulykeqy0pUn7buMdSwqQT2ULO7v9USTE5n2B5xYIU RK+GzB0Y8v2byjNImF2nsEhtK/tmy1X69isaNCeHkP489ftIfVzfEtjzq1rRtaMEGvIg H+BihXxWdgw22sU5Q9Cg6nGLFIuri/Uied3WuxQxSuRgnLwHnFpqcwXElmVShx6pNxgF 578sd2IbEgerQEFFU6NeMZquxrK+h4P0GcViRMsltPkDzwkPPTmvUTxZjZD2jLVa38gp mzIw== X-Gm-Message-State: AOUpUlGX4+FJI+yT0kW2takRbQbTLqJXJd9avUB+4s/E8vcgc/JhGnHV c/BebylxG206U34l0J9EJrJqDhwnKyWtexIeMws= X-Google-Smtp-Source: AAOMgpePwxzmiGsC2PTwIgkZVciuqRaz0kODwF1KE5Wz1OuNnZiSy+Qokk4aYeM9BEV71730CS6eCB4sG1hSCurYjY4= X-Received: by 2002:aca:ceca:: with SMTP id e193-v6mr717113oig.37.1531371963236; Wed, 11 Jul 2018 22:06:03 -0700 (PDT) In-Reply-To: <83a7qxfa7r.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::235 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:117406 Archived-At: On Thu, Jul 12, 2018 at 9:41 AM Eli Zaretskii wrote: > 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. That=E2=80=99s not entirely accurate: using the CreateProcessW API, you cou= ld pass UTF-16. However, in order to make full use of arguments passed that way, the sub-program needs to forgo the normal =E2=80=9Cint main(int, char**)=E2=80=9D signature and use =E2=80=9Cint _wmain(int, wchar_t**)=E2= =80=9D, or to call GetCommandLineW and parse the returned UTF-16 string. A sub-program that accepts arguments via the usual =E2=80=98main=E2=80=99 function will b= e limited to characters that are representable in the current codepage. I do not know whether MSYS binaries do that.