title: Why u8'A' can be a char type while UTF-8 can be up to 4 bytes and char is normally 1 byte?
body: <p>I was reading <a href="https://stackoverflow.com/questions/13509733/">What is the use of wchar_t in general programming?</a> and found something confusing in the accepted answer:</p>
  
  <blockquote>
    <p>It's more common to use char with a variable-width encoding e.g. UTF-8 or GB 18030.</p>
  </blockquote>
  
  <p>And I find this from my textbook:</p>
  
  <p><a href="https://i.stack.imgur.com/kUioT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kUioT.png" alt="image"></a></p>
  
  <p>Isn't Unicode encoding with UTF-8 is at most 4 bytes? <code>char</code> for most platforms is 1 byte. Do I misunderstand something?</p>
  
  <hr>
  
  <p>Update:  </p>
  
  <p>After searching and reading, now I know that:</p>
  
  <ol>
  <li>code points and code units are different stuff. Code point is unique while code units rely on encoding. </li>
  <li>u8'a'(a char, not string here) is only allowed for basic character set(the ASCII and it's control character stuff), and its value is the corresponding 'a''s code unit value, and for ascii characters, code units are same value as code points. (This is what <strong>@codekaizer</strong>'s answer say)</li>
  <li><code>std::string::size()</code> returns code units.</li>
  </ol>
  
  <p>So the editors are all dealing with <strong>code units</strong> right? And If I change my file encoding from utf8 to uft32, then size of <code>ə</code> would be <strong>4</strong>?</p>