Desdinova;10914128 wrote:
I considered a str_replace, but I hate having to list alllll possibilities (ë, é, è, etc).
You could always simply use strtr() with an array consisting of characters you would like to replace:
$str = 'Here are some example characters: ë, é and è';
$trans = array('ë'=>'ë', 'é'=>'é', 'è'=>'è');
$str = strtr($str, $trans);
Sure, you create a list.. but once done.. it's done (then again, if utf8_encode() works for you, perfect). As for file_get_contents(), this just reads an entire file into a string (don't worry, newlines and return carriages are still there - If that's what you're getting at).