Support Chinese or other non-ASCII characters in command 'winzou:state-machine:debug'
mayne opened this issue · 0 comments
mayne commented
Hello,
Some content is not described in English in metadata
in state-machine.php
,
when I run command php artisan in winzou:state-machine:debug
in cli,
these non-ASCII characters will be escaped as Unicode encoding like "\u7248\u6743\u54c1\u827a\u672f".
By modifying the code
$metadata = json_encode($state['metadata'], JSON_PRETTY_PRINT);
in line 110 in file sebdesign/laravel-state-machine/src/Commands/Debug.php
to
$metadata = json_encode($state['metadata'], JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
problem will be solved.