Bug #81598 [Opn->Asn]: Cannot input unicode characters in PHP 8 interactive shell

From: Date: Mon, 08 Nov 2021 16:06:54 +0000
Subject: Bug #81598 [Opn->Asn]: Cannot input unicode characters in PHP 8 interactive shell
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237616@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81598&edit=1

 ID:                 81598
 Updated by:         nikic@php.net
 Reported by:        7snovic at gmail dot com
 Summary:            Cannot input unicode characters in PHP 8 interactive
                     shell
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            CGI/CLI related
 Operating System:   Ubuntu 20
 PHP Version:        8.0Git-2021-11-08 (snap)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

I can reproduce this. And I can also reproduce on 7.4 when running with "LANG=C php7.4
-a". The relevant change here is probably that PHP 8 no longer inherits the ctype locale from
environment.


Previous Comments:
------------------------------------------------------------------------
[2021-11-08 16:06:29] cmb@php.net

Thanks for the swift reply!  I have no idea what might have
changed in PHP 8, and I'm usually working on Windows, I'll pass on
this one.

------------------------------------------------------------------------
[2021-11-08 14:49:34] 7snovic at gmail dot com

Hello cmb,

HYG the output for the READLINE_LIB for PHP7.4, PHP8.0,and PHP8.1.

hassan@hassan:~$ php7.4 -r 'echo READLINE_LIB . "\n";'
libedit
hassan@hassan:~$ php8.0 -r 'echo READLINE_LIB . "\n";'
libedit
hassan@hassan:~$ php8.1 -r 'echo READLINE_LIB . "\n";'
libedit

Please note that the but is in both PHP8.0 & PHP8.1

------------------------------------------------------------------------
[2021-11-08 14:45:46] 7snovic at gmail dot com

Update the package

------------------------------------------------------------------------
[2021-11-08 14:12:23] cmb@php.net

I'm assuming that this is about the interactive *shell* (where you
have a command prompt).  If so, do you use the same readline
implementation (echo READLINE_LIB;) with both PHP versions?

------------------------------------------------------------------------
[2021-11-08 12:15:41] 7snovic at gmail dot com

Description:
------------
When trying to use PHP in the interactive mode in PHP 8 you can not type any non-ASCII character
like Arabic, Chinese and other languages.

$ php8.0 -a
echo "اهلا";

will copy echo ""; only into your terminal.

$ php7.4 -a
echo "اهلا";

will copy "اهلا"; into your terminal.

another references: https://stackoverflow.com/questions/69882515/cannot-input-unicode-characters-in-php-8-interactive-shell

https://stackoverflow.com/questions/69750044/php-8-shell-cant-input-non-ascii-chars



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=81598&edit=1


Thread (13 messages)

« previous php.bugs (#237616) next »