When PHP outputs file names from an FTP folder it produces French characters which are 3 characters long, so when we var_dump:
var_dump("é");
It shows:
string(3)
But the actual character should be
string(2)
The file names are pulled using a Wordpress function
When it's string(3) we can't do a preg_match on it to replace it with a standard ASCII character.
I tried declaring the formatting as UTF-8, but it's already UTF-8. Also tried
header('Content-Type: text/html; charset=iso-8859-1');
But the result is garbled text.
Is there anything else we can try? What kind of a character is it?