I'm developing a CLI based on Symfony Console (v4.1) and I'm fighting against the following issue: wrongly typing a special character in the answer (implementing InputInterface and Question) and then deleting it, it seems that the console keeps it "in memory", so when the answer is confirmed its value contains an unknown character (�). For example, typing "footballò" and immediately reverting to "football" by pressing the delete key the result is "football�". Any suggestion?
Thanks a lot!
UPDATES: It seems that the problem is limited to IDEs' terminal (tested with PHPStorm and Visual Studio Code), probably because of encoding settings. Is there a way to prevent the behaviour on application side?