$outtext .= preg_replace("/[a-zA-Z0-9+>\s\,.\/'-\n\r\t\f@\/_():]/"," ",$thisline) . "\n";
Hmm.. your pattern is really convoluted... It could be re-written as:
setlocale(LC_CTYPE, 'C');
$outtext .= preg_replace('#[^\w+>\s,.\'@/():-]#', ' ', $thisline) . "\n";
\w typically equals a-zA-Z0-9_ but depending on your locale, it might also include things like accented characters.. if you want these characters protected as well (and your locale supports this within \w), simply get rid of the first line in that snippet.
Note as a result the differences in patterns. Since we know what \w stands for, that eliminates the need for a-zA-Z0-9_ in your pattern. Note that \s is a shorthand character class for any whitespace character, so that eliminates the need for \n\r\t\f. Most special characters lose their special meaning within a character class, so there is no need to escape most of those.. I would also use single quotes instead of double ones in preg statements.
Your pattern (as well as this one) should protect the apostrophe though. If it is an issue of smart quotes (I'm not entirely sure), perhaps have a look at this to see if that helps out?