[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grep Japanese characters
From: |
Eli Zaretskii |
Subject: |
Re: Grep Japanese characters |
Date: |
Thu, 12 Jul 2018 16:27:00 +0300 |
> From: Yuri Khan <yurivkhan@gmail.com>
> Date: Thu, 12 Jul 2018 12:05:51 +0700
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>
> 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.
Not only does the sub-program need to use _wmain instead of main, it
must also internally use wchar_t data type instead of char for text
strings. Ports of GNU and Unix software generally won't do that, so
passing UTF-16 encoded text to them is not really useful, with a few
very rare exceptions.
- Re: Grep Japanese characters, (continued)
- Re: Grep Japanese characters, Eli Zaretskii, 2018/07/12
- Re: Grep Japanese characters, Tak Kunihiro, 2018/07/12
- Re: Grep Japanese characters, Eli Zaretskii, 2018/07/13
- Re: Grep Japanese characters, Filipp Gunbin, 2018/07/13
- Re: Grep Japanese characters, Eli Zaretskii, 2018/07/13
- Re: Grep Japanese characters, Filipp Gunbin, 2018/07/16
- Re: Grep Japanese characters, Eli Zaretskii, 2018/07/16
- Re: Grep Japanese characters, YUE Daian, 2018/07/12
- Re: Grep Japanese characters, Eli Zaretskii, 2018/07/12
Re: Grep Japanese characters, Yuri Khan, 2018/07/12
- Re: Grep Japanese characters,
Eli Zaretskii <=