Description
Symfony version(s) affected: 3.4.28
Description
my command code:
// table comment
$question = new Question($questionHelper->getQuestion('Enter table comment', ''), '');
$tableComment = $questionHelper->ask($input, $output, $question);
on windows MINGW32.
php bin/console kit:doctrine:generate:entity -vvv
Welcome to the kitlabs Doctrine2 entity generator
This command helps you generate Doctrine2 entities.
First, you need to give the entity name you want to generate.
You must use the shortcut notation like AcmeBlogBundle:Post.The Entity shortcut name: ProcessBundle:Test
P[K7rocessBundle8r[K7ocessBundle8o[K7cessBundle8c[K7essBundle8e[K7ssBundle8s[K7sBundle8s[K7Bundle8B[K7undle8u[K7ndle8n[K7dle8d[K7le8l[K7e
8e[K78:[KT[Ke[Ks[Kt[K
Enter table comment: 测试In QuestionHelper.php line 175:
[Symfony\Component\Console\Exception\RuntimeException]
Aborted.Exception trace:
() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:175
Symfony\Component\Console\Helper\QuestionHelper->doAsk() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:80Symfony\Component\Console\Helper\QuestionHelper->ask() at D:\phpStudy\WWW\space2019\law\vendor\kitlabs\kit-generator-bundle\Command\GenerateDoctrineEntityCommand.php:167
Kit\GeneratorBundle\Command\GenerateDoctrineEntityCommand->interact() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Component\Console\Command\Command
.php:240
Symfony\Component\Console\Command\Command->run() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:987
Symfony\Component\Console\Application->doRunCommand() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:86Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:25
5
Symfony\Component\Console\Application->doRun() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:74
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at D:\phpStudy\WWW\space2019\law\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:148
Symfony\Component\Console\Application->run() at D:\phpStudy\WWW\space2019\law\bin\console:27kit:doctrine:generate:entity [--entity [ENTITY]] [--table_comment [TABLE_COMMENT]] [--fields FIELDS] [--format FORMAT] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--
version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] []
the code: \vendor\symfony\symfony\src\Symfony\Component\Console\Helper\QuestionHelper.php:175
if (false === $ret) {
$ret = fgets($inputStream, 4096);
if (false === $ret) {
throw new RuntimeException('Aborted.');
}
$ret = trim($ret);
}
but, when i use cmd.exe i can't input chinese word.
on my macbook it it ok.
my extends bundle github.com/kitlabs-cn/KitGeneratorBundle
How to reproduce
install my extends bundle
composer require kitlabs/kit-generator-bundle
run my command(on MINGW32 git bash):
php bin/console kit:doctrine:generate:entity -vvv
when "Enter table comment: " input "测试" or "你好" (chines word) it is Aborted.
but, on cmd.exe
i can't input chinese word.
Possible Solution
Additional context