Sanitizing and replacing

I have a page that is working fine, but after users input a text in one form they sometimes use " or ’ and when I clear all the input fields to sanitize I get the ascii code instead. Not sure where this is done, but I just donut want to change too much in my old script. So, instead I thought it is better to just replace the ones I know they usually write and make this before inserting into the db.

But how can I look for these in a string to replace them best?

If a string looks something like this:
$headline=“This is &#34my&#34 best, and it&#39s great”;

I want it to deliver the following before inserting:
This is “my” best, and it’s great

Is there a simple way to replace ascii code to UTF-8 or do I have to check for the different ascii codes and replace them one by one?
Any solutions?

Now I tried to solve it this way:

$title=$_POST['title'];
$title = str_replace('& #34;', '"', html_entity_decode($title));
$title = str_replace("& #39;", "'", html_entity_decode($title));

I had to split the code up so it didn’t change my ascii code to regular chars up here.

Maybe there is something better to make it work for translating ascii code to normal chars?