RE: [PHP-CVS] com php-src: improve and generalize the recognition of a cli sapi: win32/codepage.c
| From: | Anatol Belski | Date: | Mon, 09 Jan 2017 10:14:41 +0000 |
| Subject: | RE: [PHP-CVS] com php-src: improve and generalize the recognition of a cli sapi: win32/codepage.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-96648@lists.php.net to get a copy of this message | ||
Hi Kalle,
> -----Original Message-----
> From: kalle.php@gmail.com [mailto:kalle.php@gmail.com] On Behalf Of Kalle
> Sommer Nielsen
> Sent: Monday, January 9, 2017 6:21 AM
> To: Anatol Belski <ab@php.net>
> Cc: php-cvs@lists.php.net
> Subject: Re: [PHP-CVS] com php-src: improve and generalize the recognition of a
> cli sapi: win32/codepage.c
>
> Hi Anatol
>
> 2017-01-08 23:54 GMT+01:00 Anatol Belski <ab@php.net>:
> > Commit: d4547304074096a9163488e7504c5ae5728605a2
> > Author: Anatol Belski <ab@php.net> Sun, 8 Jan 2017 23:54:58 +0100
> > Parents: c846daef28bd1dfbf10cdf905aad40a5fd3be62f
> > Branches: PHP-7.1 master
> >
> > Link: http://git.php.net/?p=php-
> src.git;a=commitdiff;h=d4547304074096a9163488e7504c5ae5728605a2
> >
> > Log:
> > improve and generalize the recognition of a cli sapi
> >
> > Changed paths:
> > M win32/codepage.c
> >
> >
> > Diff:
> > diff --git a/win32/codepage.c b/win32/codepage.c index
> > 416fa28..aa57892 100644
> > --- a/win32/codepage.c
> > +++ b/win32/codepage.c
> > @@ -252,6 +252,11 @@ __forceinline static char
> *php_win32_cp_get_enc(void)
> > return enc;
> > }/*}}}*/
> >
> > +__forceinline static BOOL php_win32_cp_is_cli_sapi() {/*{{{*/
> > + return strlen(sapi_module.name) >= sizeof("cli") - 1 &&
> > +!strncmp(sapi_module.name, "cli", sizeof("cli") - 1); }/*}}}*/
>
> Shouldn't this include phpdbg too? In that case we can use
> sapi_module.phpinfo_as_text
>
I'm was still careful till now about phpdbg, so didn't make the full integration there
with the console codepage switch, etc. The reason was, that i had some weird issues at some early
patch times. But yep, the change itself was also with the thought to put possibly more suitable
SAPIs into the function. The full integration would require a bit more code to be putinto phpdbg
itself, to convert argv and do some additional setup. Same regards to FCGI actually, probably with a
smaller extent. I'd still prefer to not to touch these and wait to possible bug reports, before
taking an action. If you or someone had time to have some deeper look into these parts, to catch
issues beforehand, I'd really appreciate!
Thanks
Anatol