Closed as not planned
Description
Symfony version(s) affected
allk
Description
Woooo, I faced a very hard to find bug!
I use bopoda/robots-txt-parser
, and they hardcoded something very strange in a class:
// Strip invalid characters from UTF-8 strings
ini_set('mbstring.substitute_character', "none");
I already open an issue there to fix the issue.
But I think we can protect Symfony for such issue.
How to reproduce
I created a small reproducer.
(Un)Comment the following line, and run the script
new RobotsTxtParser('');
You'll see the output is different.
Possible Solution
Force the following line in our code
ini_set('mbstring.substitute_character', "");
Additional Context
I'm not sure we have to do this. But let's discuss it!