title: Remove Hidden Non-ASCII Characters [PHP or MySQL]
body: <p>I'm having a problem with hidden non-ASCII characters (spaces) in my database.</p>
  
  <p>How can I replace them with normal spaces and convert them before being inserted to avoid future problems?</p>
  
  <p>I'm still not 100% sure what's happening, but I think it's with the non-ASCII spaces. Any advice to help track it down will help.</p>
  
  <hr>
  
  <p>Here's what's happening:</p>
  
  <p>I have a database with keywords and if I search for "test keyword", nothing shows up. I know for a fact that "test keyword" is in the database.</p>
  
  <p>If I search for "test" or "keyword", it will show up.</p>
  
  <p>If I do a query with:</p>
  
  <p><code>SELECT * FROM keywords WHERE keyword regexp '[^ -~]';</code> (<a href="https://stackoverflow.com/questions/401771/how-can-i-find-non-ascii-characters-in-mysql/639295#639295">found here</a>)</p>
  
  <p>It will display "test keyword" - giving me the conclusion there is a non-ASCII character with the space in "test keyword".</p>