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: Verified
Type: Bug
Package: CGI/CLI related
Operating System: Ubuntu 20
PHP Version: 8.0Git-2021-11-08 (snap)
Block user comment: N
Private report: N
New Comment:
From a quick test, calling setlocale() at the start of the session doesn't seem to work. It
would be pretty bad UX as well.
Though that gives me a tiny bit of hope that maybe it's sufficient to have the locale set
during some kind of startup procedure, and we can use the C locale afterwards.
Previous Comments:
------------------------------------------------------------------------
[2021-11-08 16:14:52] cmb@php.net
> The relevant change here is probably that PHP 8 no longer> inherits the ctype locale from environment.
Ah, so this would be rather a documentation issue, telling users
to call setlocale() at the start of their session?
------------------------------------------------------------------------
[2021-11-08 16:07:16] nikic@php.net
(Undoing concurrent status changes)
------------------------------------------------------------------------
[2021-11-08 16:06:54] nikic@php.net
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.
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81598
--
Edit this bug report at https://bugs.php.net/bug.php?id=81598&edit=1