php-spellchecker
php-spellchecker copied to clipboard
Process with command "aspell --encoding utf-8 -a --lang=en_US" has failed running with exit code 1 on Windows
when I create execute of aspell its throw an exception
$spell = Aspell::create(); $response = $spell->check('mispell', ['en_US']); logger(print_r($response, true));
PHP 8: Window 10 Laravel 9 xampp
Hello @AmilaPriyankara, thanks for you report.
I haven't tested the lib on windows to be honest, so I'll try to blindly debug it with you.
In tinker, instead of
Could you try
var_dump(iterator_to_array($response)))
Also when testing the command line directly, could you try echo 'mispell' | aspell --encoding=utf-8 -a --lang=en_US
as it's what is actually executed in the background.
Let me know the output for both please.
Digging a little further, according to https://superuser.com/questions/1496150/configuring-aspell-to-support-utf-8-encoded-texts it seems like --encoding
is only supported in aspell 0.60
which is not available on windows (your version is 0.50
which seems to be concording).
I'm unsure on how to circumvent the problem to support aspell usage for windows users right now. If you tried anything on your hand, let me know.