I'm working on my cousins webpages on my spare time, and have been succesfull mostly. The pages are almost done, except for a minor bugger: the scandinavian umlauts (ä and ö) turn out corrupted. I believe the browser is responsible, cos when I look at the HTML source (in notepad) the umlauts show up just fine. So I tough the safest way would be to replace them umlauts with their HTML codes like ä and ö So I lifted some code from php.net:
Code: Select all
$trans = array('ä' => 'ä', 'Ä' => 'Ä', 'ö' => 'ö', 'Ö' => 'Ö');
$ctmp = strtr($_POST['comment'], $trans);Code: Select all
$trans = array("ä" => 'ä', "Ä" => 'Ä', "ö" => 'ö', "Ö" => 'Ö');
$ctmp = str_replace(array_keys($trans), $trans, $_POST['comment']);Oh, and just for some background; I pick up the data from a form and simply write the entries into a txt file. And by directly looking at this file I can verify that the umlauts were not changed (also checked that the browser doesn't translate HTML codes when viewing txt files).
help much priciated!