I am trying to convert Word text pasted by users that contain MS Word ellipsis and long dash before processing it further.
I found an old proposed solution here to t
it works for me:
$str=file_get_contents($file); $array=array("‘"=>"'","’"=>"'","”"=>'"',"“"=>'"',"–"=>"-","—"=>"-","–"=>"-","…"=>"..."); $str = strtr( $str,$array); file_put_contents($file,$str);