-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version
Symfony Console 5.0 (only this bundle).
Description
I'm only using Symfony Console to generate PHP code and I have to ask informations to the user. When I run my script, I must use special characters to display a question, and it is displayed nicely. But when I submit informations with special characters, all of them are replaced by blank spaces.
Example
Please write the value for the field "Libellé" : # The character rendering is fine there
> My favourite libellé # User input
The following libellé has been defined : My favourite libell # Only the answer has been "sanitized"
Possible solutions
I tried to add setTrimmable(false)
to the Question object, but it didn't help. I also tried to create a validate
function, to see if I could get the input in it raw form, but the input is still sanitized. I also tried to save the input in a variable and convert it to UTF-8 but it couldn't change something about it. I tried the PHP functions iconv
and mb_convert_encoding
and none of them could solve the issue.
Do you guys have an idea about the issue origin and if there is a way to fix it ?