title: Converting Microsoft Word special characters with PHP
body: <p>I am trying to convert Word text pasted by users that contain MS Word ellipsis and long dash before processing it further.</p>
  
  <p>I found an old proposed solution here to the problem <a href="http://www.codingforums.com/archive/index.php/t-47163.html" rel="noreferrer">http://www.codingforums.com/archive/index.php/t-47163.html</a> , but it does not work for me. After replacing the ellipsis for example , the variable comes back as empty. Never seen anything like this before:</p>
  
  <pre><code>$src = "Long word dash – and weird Word ellipsis…";
  $src = str_replace("‘", "'", $src);
  $src = str_replace("’", "'", $src);
  $src = str_replace("”", '"', $src);
  $src = str_replace("“", '"', $src);
  $src = str_replace("–", "-", $src);
  $src = str_replace("…", "...", $src);
  print $src;
  </code></pre>
  
  <p>Any ideas?</p>