title: What is difference between CW2A(LPCWSTR)str) and CW2A(LPCWSTR)str, CP_UTF8)?
body: <p>I am trying to convert few <strong>CStringW</strong> strings to <strong>CStringA</strong> strings. One of the strings (lets call it otherLangString) is in other language (Chinese, Arabic etc.). All the other strings had no issue getting converted when used like this :</p>
  
  <pre><code>CW2A((LPCWSTR)some_String);
  </code></pre>
  
  <p>But when used for the otherLangString, I was getting "?????"
  So to fix that, I did this and it worked</p>
  
  <pre><code>CW2A(some_String, CP_UTF8);
  </code></pre>
  
  <p>Now in the code some all conversions looked like the 1st sample except one which looked like the 2nd sample.</p>
  
  <p>For consistency I mixed above two and did this for all.</p>
  
  <pre><code>CW2A((LPCWSTR)some_String, CP_UTF8);
  </code></pre>
  
  <p>My questions is, What is the difference between following ?</p>
  
  <pre><code>- CW2A((LPCWSTR)some_String, CP_UTF8) and CW2A(some_String, CP_UTF8);
  - CW2A((LPCWSTR)some_String) and CW2A(some_String, CP_UTF8);
  </code></pre>