title: How to get the UNICODE code from each character of a UTF-8 string?
body: <p>With C++11, how can I, from an UTF-8 encoded <code>std::string</code>, get the Unicode value of each character of the text into an <code>uint32_t</code>?</p>
  
  <p>Something like:</p>
  
  <pre><code>void f(const std::string &amp;utf8_str)
  {
      for(???) {
         uint32_t code = ???;
  
         /* Do my stuff with the code... */
      }
  }
  </code></pre>
  
  <p>Does assuming the host system locale is UTF-8 helps? What standard library tools C++11 offers for the task?</p>