title: How to use UTF-8 and Unicode in C++? How big is C++20 char8_t?
body: <p>Let's say I want to store a single (not as in <code>std::string</code>) Unicode character in C++, how would I do that? <code>char8_t</code> was introduced in C++20, but it seems it's just a typedef of <code>unsigned char</code>, only storing up to 1 byte of information. Some characters (especially more exotic ones like emoji) can take up to 4 bytes at once.</p>
  
  <p>Example of code that doesn't work:</p>
  
  <pre><code>char8_t smth = "";
  </code></pre>
  
  <p>Interestingly this WILL work although <code>sizeof()</code> says it's 8 bytes big, which I somehow doubt.</p>
  
  <pre><code>const char* smth = "";
  </code></pre>