help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grep Japanese characters


From: Yuri Khan
Subject: Re: Grep Japanese characters
Date: Thu, 12 Jul 2018 12:05:51 +0700

On Thu, Jul 12, 2018 at 9:41 AM Eli Zaretskii <eliz@gnu.org> 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’s not entirely accurate: using the CreateProcessW API, you could
pass UTF-16. However, in order to make full use of arguments passed
that way, the sub-program needs to forgo the normal “int main(int,
char**)” signature and use “int _wmain(int, wchar_t**)”, or to call
GetCommandLineW and parse the returned UTF-16 string. A sub-program
that accepts arguments via the usual ‘main’ function will be limited
to characters that are representable in the current codepage.

I do not know whether MSYS binaries do that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]