At work I've always had problems when people copy and paste from word into PeopleSoft because I've then used that data to populate XML files for other people to use. I've been automating everything in regards to generating these files so instead of manually editing the special characters for (R) and (TM) I've had to get inventive. Below is the code I've come up with this to remove the special character to the registration symbol into an XML UTF-8 symbol that will display correctly on the web. If I ever have to include more characters I'll keep updating this post.
$specials = array(); $specials['®'] = substr( strstr( $str, 174 ), 0, 1 ); foreach( $specials as $k => $v ) $str = str_replace( $v, $k, $str );
