简体   繁体   English

PHP 8 shell:无法输入非 Ascii 字符

[英]PHP 8 shell: can't input non-Ascii chars

After upgrading to PHP 8 in my WSL 2 I stuck with a strange problem: I can't input any non-ASCII character in shell, nor in interactive shell and PsySH.在我的 WSL 2 中升级到 PHP 8 后,我遇到了一个奇怪的问题:我无法在 shell 中输入任何非 ASCII 字符,也无法在交互式 shell 和 PsySH 中输入。

I tried Russian, Serbian and some unicode symbols.我尝试了俄语、塞尔维亚语和一些 unicode 符号。

In simple words: if I try to input in shell " Привет " - russian letters just not get in terminal.简单来说:如果我尝试在 shell 中输入“ Привет ” - 俄语字母就无法进入终端。

I have this behavior in Ubuntu 21.10 (bare metal) and 20.04 (WSL2).我在 Ubuntu 21.10(裸机)和 20.04(WSL2)中有这种行为。 In Mac OS - everything fine.在 Mac OS 中 - 一切正常。

Does anyone encounter this problem or have workaround for it?有没有人遇到这个问题或有解决方法?

You may give a try on Windows Terminal .你可以试试Windows Terminal Here I use Traditional Chinese as an example:这里我以繁体中文为例:

在此处输入图片说明

It works perfectly with WSL 2 and I think Russian should work in your case too.它与 WSL 2 完美配合,我认为俄语也应该适用于您的情况。

It is a bug in PHP 8 version.这是 PHP 8 版本中的一个错误。 https://bugs.php.net/bug.php?id=81598 https://bugs.php.net/bug.php?id=81598

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM