title: Convert UTF-8 to/from UCS-2 in C++98
body: <p>How can I convert an UTF-8 string into an UCS-2 string, and vice-versa, in the environment:</p>
  
  <ul>
  <li><p><strong>C++98</strong></p></li>
  <li><p><strong>Boost</strong> is allowed, but no other libraries (e.g. no Microsoft or 3d party)</p></li>
  </ul>
  
  <p>I learned so far:</p>
  
  <ul>
  <li><p>I need UCS-2, not UTF-16. So <strong>utf_to_utf()</strong> alone wouldn't work.</p></li>
  <li><p>In C++98 <strong>std::codecvt_utf8</strong> is unavailable.</p></li>
  <li><p>Also unavailable: std::locale locale("<strong>en_GB.utf8</strong>") (but promising approach ?)</p></li>
  </ul>
  
  <p>I can't believe that this is so difficult in C++98 ?</p>