title: WideCharToMultiByte problem
body: <p>I have the lovely functions from my <a href="https://stackoverflow.com/questions/3329718/utfcpp-and-win32-wide-api">previous question</a>, which work fine if I do this:</p>
  
  <pre><code>wstring temp;
  wcin &gt;&gt; temp;
  
  string whatever( toUTF8(getSomeWString()) );
  
  // store whatever, copy, but do not use it as UTF8 (see below)
  
  wcout &lt;&lt; toUTF16(whatever) &lt;&lt; endl;
  </code></pre>
  
  <p>The original form is reproduced, but the in between form often contains extra characters. If I enter for example <code>àçé</code> as the input, and add a <code>cout &lt;&lt; whatever</code> statement, i'll get <code>┬à┬ç┬é</code> as output.</p>
  
  <p>Can I still use this string to compare to others, procured from an ASCII source? Or asked differently: if I would output <code>┬à┬ç┬é</code> through the UTF8 cout in linux, would it read <code>àçé</code>? Is the byte content of a string <code>àçé</code>, read in UTF8 linux by cin, exactly the same as what the Win32 API gets me?</p>
  
  <p>Thanks!</p>
  
  <p>PS: the reason I'm asking is because I need to use the string a lot to compare to other read values (comparing and concatenating...).</p>