I'm trying to enter some non-ascii characters (Farsi/Arabic) into artisan console commands but $this->ask('Enter the description') returns null if I use something like following as answer of ask in my terminal (which is PowerShell 7.1.4).
Console command code:
$answer = $this->ask('Enter the description');
echo $answer,"\n", $answer===null ? 'Null entered' : 'non null';
Terminal:
$ php artisan mycommand:test
> Enter the description:
<<< سلام دنیا
>
> Null entered
How can I fix this?
source https://stackoverflow.com/questions/70101428/laravel-artisan-commands-input-non-ascii-not-working
Comments
Post a Comment