In addition to replacing Microsoft Windows smart quotes, as sgaston demonstrated on 2006-02-13, I replace all other Microsoft Windows characters using suggestions[1] published by character code specialist[2] Jukka Korpela.
<?php
$str = str_replace(chr(130), ',', $str); $str = str_replace(chr(131), 'NLG', $str); $str = str_replace(chr(132), '"', $str); $str = str_replace(chr(133), '...', $str); $str = str_replace(chr(134), '**', $str); $str = str_replace(chr(135), '***', $str); $str = str_replace(chr(136), '^', $str); $str = str_replace(chr(137), 'o/oo', $str); $str = str_replace(chr(138), 'Sh', $str); $str = str_replace(chr(139), '<', $str); $str = str_replace(chr(140), 'OE', $str); $str = str_replace(chr(145), "'", $str); $str = str_replace(chr(146), "'", $str); $str = str_replace(chr(147), '"', $str); $str = str_replace(chr(148), '"', $str); $str = str_replace(chr(149), '-', $str); $str = str_replace(chr(150), '-', $str); $str = str_replace(chr(151), '--', $str); $str = str_replace(chr(152), '~', $str); $str = str_replace(chr(153), '(TM)', $str); $str = str_replace(chr(154), 'sh', $str); $str = str_replace(chr(155), '>', $str); $str = str_replace(chr(156), 'oe', $str); $str = str_replace(chr(159), 'Y', $str); ?>
[1] On the use of some MS Windows characters in HTML
http://www.cs.tut.fi/~jkorpela/www/windows-chars.html
[2] Unicode Explained by Jukka Korpela
http://www.amazon.com/dp/059610121X/