title: UTF-8 & Unicode, what's with 0xC0 and 0x80?
body: <p>I've been reading about Unicode and UTF-8 in the last couple of days and I often come across a bitwise comparison similar to this :</p>
  
  <pre><code>int strlen_utf8(char *s) 
  {
    int i = 0, j = 0;
    while (s[i]) 
    {
      if ((s[i] &amp; 0xc0) != 0x80) j++;
      i++;
    }
    return j;
  }
  </code></pre>
  
  <p>Can someone clarify the comparison with 0xc0 and checking if it's the most significant bit ?</p>
  
  <p>Thank you!</p>
  
  <p>EDIT: ANDed, not comparison, used the wrong word ;)</p>