title: How to convert unicode code points to utf-8 in c++?
body: <p>I have an array consisting of unicode code points</p>
  
  <pre><code>unsigned short array[3]={0x20ac,0x20ab,0x20ac};
  </code></pre>
  
  <p>I just want this to be converted as utf-8 to write into file byte by byte using C++.</p>
  
  <p>Example:
  0x20ac should be converted to e2 82 ac. </p>
  
  <p>or is there any other method that can directly write unicode characters in file.</p>