title: replace garbage characters within mysql
body: <p>My db is in <code>latin1</code> and is full of <code>â&amp;quot;</code> or <code>'��&amp;quot;'</code> (depending on whether my terminal is set to latin1 or unicode, respectively). From context, I think they should be emdashes.  They appear to be causing nasty bugs when rendered (or not rendered) in IE.  I'd like to find and replace them.  The problem is that neither the â nor � character match with <code>replace</code>.  Running the query:</p>
  
  <pre><code>    update TABLE set COLUMN = replace(COLUMN,'��&amp;quot;','---');
  </code></pre>
  
  <p>Executes without error but doesn't do anything (0 rows changed).  It's clear to me that the "question mark in the diamond" character is not being matched when I copy it in the terminal.  Is there a way to find out its code and match it by that or something?  The <code>mysql</code> console is tantalizingly close to being able to do this in one line so I'd rather not script it outside the terminal if I can avoid it.</p>
  
  <p>The db is hosted Amazon RDS so I can't install the regexp udf that I've seen referenced in other questions here. In the long term, I'm going to have to properly convert the whole db to utf8 but I need to fix this rendering problem right away.</p>
  
  <p>EDIT:</p>
  
  <p>I've isolated the bad character with <code>hexdump</code>, it's e2 80 (I don't think this corresponds to any unicode character).  How can I feed that to the replace function?</p>
  
  <pre><code>    update TABLE set COLUMN = replace(COLUMN, char(0xe2,0x80),'---');
  </code></pre>
  
  <p>does not do anything.</p>