in reply to replacing close-single-quote with apostrophe
You should better rely on proper encoding of your script and the input layer and just write s/`/'/g like choroba showed you in the second part.
Fiddling with bytes instead of characters isn't a clean approach.
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery