$ime = str_replace($_POST['ime'], "è", "c");
Tried this, replacement took place, and stripped all other letters from the $ime variable.
So instead of example. "car" I got "c".
However, I believe I should fiddle with properly formatted array to perform this. Geez, I am already banging my head to a table...
Anyway, after getting this to work, I even might be able to replace accented characters with proper encoding entities to really display accented characters properly at some point.
Now I've seen a solution from some Czech guy using the same codepage. I didn't get it to work because I don't understand his numerous explanations, but I'll post his code as an idea:
function CZMail($to, $subj, $text, $headers = "")
{
// pøevedení z windows-1250 do iso-8859-2 (pokud je potøeba)
$text = StrTr($text,
"\x8A\x8D\x8E\x9A\x9D\x9E",
"\xA9\xAB\xAE\xB9\xBB\xBE");
// pøekódování do Base64
$text = Base64_Encode($text);
// pøidání hlavièek
$headers .= "MIME-Version: 1.0\n".
"Content-Type: text/plain; charset=\"iso-8859-2\"\n".
"Content-Transfer-Encoding: base64\n";
// odeslání e-mailu
Mail($to, $subj, $text, $headers);
}
He further says 'You can send mail with diacritics now', but all I can understand from the example is he actually replaces win-1250 characters with iso-8859-2.
Can someone help me here? My hair is in the air 🙁