title: How does a file with Chinese characters know how many bytes to use per character?
body: <p>I have read Joel's article <a href="http://www.joelonsoftware.com/articles/Unicode.html" rel="nofollow noreferrer">"The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)"</a> but still don't understand all the details. An example will illustrate my issues. Look at this file below:</p>
  
  <p><a href="https://i.stack.imgur.com/5YHfg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5YHfg.png" alt="alt text"></a><br>
  <sub>(source: <a href="http://www.yart.com.au/stackoverflow/unicode2.png" rel="nofollow noreferrer">yart.com.au</a>)</sub>  </p>
  
  <p>I have opened the file in a binary editor to closely examine the last of the three a's next to the first Chinese character:</p>
  
  <p><a href="https://i.stack.imgur.com/HT7F5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HT7F5.png" alt="alt text"></a><br>
  <sub>(source: <a href="http://www.yart.com.au/stackoverflow/unicode1.png" rel="nofollow noreferrer">yart.com.au</a>)</sub>  </p>
  
  <p>According to Joel:</p>
  
  <blockquote>
    <p>In UTF-8, every code point from 0-127 is stored in a single byte. Only code points 128 and above are stored using 2, 3, in fact, up to 6 bytes.</p>
  </blockquote>
  
  <p>So does the editor say:</p>
  
  <ol>
  <li>E6 (230) is above code point 128.</li>
  <li>Thus I will interpret the following bytes as either 2, 3, in fact, up to 6 bytes.</li>
  </ol>
  
  <p>If so, what indicates that the interpretation is more than 2 bytes? How is this indicated by the bytes that follow E6? </p>
  
  <p>Is my Chinese character stored in 2, 3, 4, 5 or 6 bytes?</p>