title: Boost Spirit (X3) symbol tables resulting in UTF8 strings
body: <p>I'm trying to parse LaTeX escape codes (e.g. <code>\alpha</code>) to the Unicode (Mathematical) characters (i.e. <code>U+1D6FC</code>).</p>
  
  <p>Right now this means I am using this <code>symbols</code> parser (rule):</p>
  
  <pre><code>struct greek_lower_case_letters_ : x3::symbols&lt;char32_t&gt;
  {
    greek_lower_case_letters_::greek_lower_case_letters_()
    {
      add("alpha",   U'\u03B1');
    }
  } greek_lower_case_letter;
  </code></pre>
  
  <p>This works fine but means I'm getting a <code>std::u32string</code> as a result.
  I'd like an elegant way to keep the Unicode code points in the code (for maybe future automation) and maintenance reasons. Is there a way to get this kind of parser to parse into a UTF-8 <code>std::string</code>?</p>
  
  <p>I thought of making the <code>symbols</code> struct parse to a <code>std::string</code>, but that would be highly inefficient (I know, premature optimization bla bla).</p>
  
  <p>I was hoping there was some elegant way instead of going through a bunch of hoops to get this working (<code>symbols</code> appending strings to the result).</p>
  
  <p>I do fear though that using the code point values and wanting UTF8 will incur a runtime cost of the conversion (or is there a <code>constexpr</code> UTF32->UTF8 conversion possibe?).  </p>