Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Special characters on asking question #36324

Copy link
Copy link
Closed
@YaFou

Description

@YaFou
Issue body actions

Symfony version(s) affected: 5.0.7

Description
In a command, when the user answers a question with special characters with accents (é, è, à, ...); the output doesn't consider these characters and removes them from the string.

How to reproduce

  1. Create a command
  2. In the execute method, write the code below:
$io = new SymfonyStyle($input, $output);
$userInput = $io->ask('Type here');
$io->writeln($userInput);
return 0;
  1. Execute the command and type such as Bonjour à tous !
  2. The output should be Bonjour \ tous !

I've reproduced the project in a repository.

Possible Solution
It's possibly the encoding of my terminal or in the source code.

Additional context
I use the Windows Terminal Preview with Git Bash. And I've tested on the Windows terminal.
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.