title: MySQL query with non-printing characters (left-to-right mark)
body: <p>I just found myself lost in the interesting situation that I need to query MySQL for fields containing a so called <a href="https://en.wikipedia.org/wiki/Right-to-left_mark" rel="nofollow">Left-to-right mark</a>.</p>
  
  <p>As the nature of this character is to be non-printing, thus invisible, I'm unable to simply copy/paste it into a query.</p>
  
  <p>As mentioned in the linked Wikipedia article, the Left-to-right mark is Unicode character U+200F, which is a fact that I'm sure is the key to success in my current adventure.</p>
  
  <p>My question is: How do I use raw Unicode in a MySQL query? Something along the lines of:</p>
  
  <pre><code>SELECT * FROM users WHERE username LIKE '%\U+200F%'
  </code></pre>
  
  <p>or</p>
  
  <pre><code>SELECT * FROM users WHERE username REGEXP '\U+200F'
  </code></pre>
  
  <p>or whatever the correct syntax for Unicode in MySQL is and depending on whether this is supported with <code>LIKE</code> and/or <code>REGEXP</code>.</p>