I'm trying to replace an apostroph ( ' ) with acute ( ´ ) from a string after entered into a form and submitted it.
<?= str_replace("'","´",$_POST['string']) ?>
string for example is: "Jan's Motel" > should become "Jan´s Motel"
This works good when using charset iso-8859-1, but I need my website to be in utf-8.
I utf-8 the result string is "Jan´s Motel"
I don't understand why it becomes " ´ " instead of " ´ "
Here ist my example code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>notitle</title>
  </head>
  <body>
    <form action="?" method="post">
      <input type="text" name="string" value="<?= str_replace("'","´",$_POST['name']) ?>" />
    </form>
  </body>
</html>
Can anyone please help?
 
     
     
    