title: Removing control characters from a UTF-8 string
body: <p>I found <a href="https://stackoverflow.com/questions/20762/how-do-you-remove-invalid-hexadecimal-characters-from-an-xml-based-data-source-pr">this</a> question but it removes all valid <code>utf-8</code> characters also (returns me a blank string, while there are valid <code>utf-8</code> characters plus control characters). As I read about <code>utf-8</code>, there's not a specific range for <code>control characters</code> and each character set has its own <code>control characters</code>.</p>
  
  <p>How can I modify <a href="https://stackoverflow.com/questions/20762/how-do-you-remove-invalid-hexadecimal-characters-from-an-xml-based-data-source-pr">above</a> solution to only remove <code>control characters</code> ?</p>