Removing Various symbols like Â é
<p>OK I have read many threads and have found some options that work but now I am just more curious than anything...</p>

<p>When trying to remove characters like: Â é as google does not like them in the XML product feed.</p>

<p>Why does this work:</p>

<p>But neither of these 2 do?</p>

<pre><code>$string = preg_replace("/[^[:print:]]+/", ' ', $string);

$string = preg_replace("/[^[:print:]]/", ' ', $string);
</code></pre>

<p>To put it all in context here is the full function:</p>

<pre><code>        // Remove all unprintable characters
        $string = ereg_replace("[^[:print:]]", ' ', $string);
        // Convert back into HTML entities after printable characters removed
        $string = htmlentities($string, ENT_QUOTES, 'UTF-8');
        // Decode back
        $string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');
        // Return the UTF-8 encoded string
        $string = strip_tags(stripslashes($string));
        // Return the UTF-8 encoded string
        return utf8_encode($string);
    }           
</code></pre>
