In a form, when the character 'é' is passed onto the processing of the form to be stored in a database, I get the following error
406 Not Acceptable
An appropriate representation of the requested resource /admin.php?... could not be found on this server.
(I know its not a me issue because only when the é character is present in the form do I get the error)
I run all the post data from the form through the following function..
function cleancode($Text) {
// Fix line breaks
$Text = str_replace( "\r", "", $Text);
$Text = str_replace( "\n", "<br />", $Text);
//Fix apostrophes
$Text = str_replace("’","'",$Text);
$Text = str_replace("‘","'",$Text);
//Fix e
$Text = str_replace("è","e",$Text);
$Text = str_replace("é","e",$Text);
//Try again to fix e
$Text = ereg_replace("(È|É|Ê|Ë|è|é|ê|ë)","e",$Text);
//Anti - SQL injections
$Text = mysql_real_escape_string($Text);
//...
}
But doesnt seem to work, I still get the same error...
Am I missing a basic function or encoding or something that takes care of special characters like the é?
Please help,