Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Brian Inglis
On 2020-09-07 15:08, Johannes Schindelin wrote: > On Mon, 7 Sep 2020, Takashi Yano via Cygwin-patches wrote: >> On Mon, 7 Sep 2020 10:26:33 +0200 >> Corinna Vinschen wrote: >>> Hi Takashi, >>> On Sep 5 17:43, Takashi Yano via Cygwin-patches wrote: On Fri, 4 Sep 2020 21:22:35 +0200 Corinn

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Johannes Schindelin
Hi Takashi, On Sat, 5 Sep 2020, Takashi Yano wrote: > On Fri, 4 Sep 2020 08:23:42 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Fri, 4 Sep 2020, Takashi Yano via Cygwin-patches wrote: > > > > > On Tue, 1 Sep 2020 18:19:16 +0200 (CEST) > > > Johannes Schindelin wrote: > > > > > > > When `LA

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Johannes Schindelin
Hi, On Mon, 7 Sep 2020, Takashi Yano via Cygwin-patches wrote: > On Mon, 7 Sep 2020 10:26:33 +0200 > Corinna Vinschen wrote: > > Hi Takashi, > > On Sep 5 17:43, Takashi Yano via Cygwin-patches wrote: > > > On Fri, 4 Sep 2020 21:22:35 +0200 > > > Corinna Vinschen wrote: > > > > > > > Btw., the ma

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 18:36:59 +0900 Takashi Yano via Cygwin-patches wrote: > > This is really confusing me. We never set the console codepage in the > > old pty code before, it was just pipes transmitting bytes. Why do we > > suddenly have to handle native apps running in a console in this case?!?

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
Here is a summary of my points: [Senario 1] 1) Start mintty (UTF-8). 2) Start another mintty by mintty -o charset=SJIS from the first mintty. [Senario 2] int pm = getpt(); if (fork()) { [do the master operations] } else { setsid(); ps = open(ptsname(pm), O_RDWR); cl

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 10:26:33 +0200 Corinna Vinschen wrote: > processes via cygheap. The idea is to get rid of the complex > setup_locale code in every execve call and just set it once in a process > tree starting at the process creating the ptys. This cause a problem if mintty is started from anot

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 18:54:45 +0900 Takashi Yano via Cygwin-patches wrote: > On Mon, 7 Sep 2020 11:08:23 +0200 > Corinna Vinschen wrote: > > Hi Takashi, > > > > On Sep 7 13:45, Takashi Yano via Cygwin-patches wrote: > > > #if 0 /* Let's try this if setting codepage at pty open time is not > > >

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 11:08:23 +0200 Corinna Vinschen wrote: > Hi Takashi, > > On Sep 7 13:45, Takashi Yano via Cygwin-patches wrote: > > #if 0 /* Let's try this if setting codepage at pty open time is not enough > > */ > > - if (!cygheap->locale.term_code_page) > > -cygheap->locale.term_code

Re: [PATCH v4 1/3] Cygwin: rewrite and make public cmdline parser

2020-09-07 Thread Corinna Vinschen
On Sep 5 13:27, Mingye Wang wrote: > This commit rewrites the cmdline parser to achieve the following: > * MSVCRT compatibility. Except for the single-quote handling (an > extension for compatibility with old Cygwin), the parser now > interprets option boundaries exactly like MSVCR since 2008.

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 10:26:33 +0200 Corinna Vinschen wrote: > Hi Takashi, > > On Sep 5 17:43, Takashi Yano via Cygwin-patches wrote: > > On Fri, 4 Sep 2020 21:22:35 +0200 > > Corinna Vinschen wrote: > > > So this boils down to the fact that term_code_page must be set > > > after the application is

Re: [PATCH v4 3/3] testsuite: don't strip dir from obj files

2020-09-07 Thread Corinna Vinschen
On Sep 5 13:27, Mingye Wang wrote: > Make has no idea how to build an o file when the correspoinding c file > is not there. That happens when we strip the dir. The testsuite is broken and neglected for a long time. You don't have to fix it and add new testcases. The better thing to do would be

Re: [PATCH v4 2/3] regparm: make code highlight happy

2020-09-07 Thread Corinna Vinschen
On Sep 5 13:27, Mingye Wang wrote: > Subject: [PATCH v4 2/3] regparm: make code highlight happy -v, please? Corinna > --- > winsup/cygwin/regparm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/cygwin/regparm.h b/winsup/cygwin/regparm.h > index cce1bab4a..a1

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Corinna Vinschen
On Sep 7 17:38, Takashi Yano via Cygwin-patches wrote: > On Mon, 7 Sep 2020 10:27:38 +0200 > Corinna Vinschen wrote: > > On Sep 5 20:15, Takashi Yano via Cygwin-patches wrote: > > > On Sat, 5 Sep 2020 17:43:01 +0900 > > > Takashi Yano via Cygwin-patches wrote: > > > No. This does not fix enough.

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Corinna Vinschen
Hi Takashi, On Sep 7 13:45, Takashi Yano via Cygwin-patches wrote: > #if 0 /* Let's try this if setting codepage at pty open time is not enough */ > - if (!cygheap->locale.term_code_page) > -cygheap->locale.term_code_page = __eval_codepage_from_internal_charset > (); > + if (!get_ttyp ()-

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 10:27:38 +0200 Corinna Vinschen wrote: > On Sep 5 20:15, Takashi Yano via Cygwin-patches wrote: > > On Sat, 5 Sep 2020 17:43:01 +0900 > > Takashi Yano via Cygwin-patches wrote: > > No. This does not fix enough. > > > > In the test case above, if it does not call setlocale(), >

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Corinna Vinschen
On Sep 6 19:28, Takashi Yano via Cygwin-patches wrote: > Hi Corinna, > > On Fri, 4 Sep 2020 14:44:00 +0200 > Corinna Vinschen wrote: > > +case 'I': /* ISO-8859-x */ > > + codepage = strtoul (charset + 9, NULL, 10); > > + break; > > This should be: > codepage = strtoul (charset + 9

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Corinna Vinschen
On Sep 5 20:15, Takashi Yano via Cygwin-patches wrote: > On Sat, 5 Sep 2020 17:43:01 +0900 > Takashi Yano via Cygwin-patches wrote: > No. This does not fix enough. > > In the test case above, if it does not call setlocale(), > __eval_codepage_from_internal_charset() always returns "ASCII" ??? _

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Corinna Vinschen
Hi Takashi, On Sep 5 17:43, Takashi Yano via Cygwin-patches wrote: > On Fri, 4 Sep 2020 21:22:35 +0200 > Corinna Vinschen wrote: > > So this boils down to the fact that term_code_page must be set > > after the application is already running and as soo as it creates > > the pty, me thinks. What i