title: Visual C++ - UTF-8 - CA2W followed by CW2T with MBCS - Possibly a bad idea?
body: <p>I'm using a library that produces UTF-8 null-terminated strings in the <code>const char*</code> type. Examples include:</p>
  
  <pre><code>MIGUEL ANTÃ“NIO
  DONA ESTEFÃ‚NIA
  </code></pre>
  
  <p>I'd like to convert those two <code>const char*</code> types to <code>CString</code> so that they read:</p>
  
  <pre><code>MIGUEL ANTÓNIO
  DONA ESTEFÂNIA
  </code></pre>
  
  <p>To that effect, I'm using the following function I made:</p>
  
  <pre><code>CString Utf8StringToCString(const char * s)
  {
      CStringW ws = CA2W(s, CP_UTF8);
      return CW2T(ws);
  }
  </code></pre>
  
  <p>The function seems to do what I want (at least for those 2 cases). However, I'm wondering: is it a good idea at all to use the CA2W macro, followed by CW2T? Am I doing some sort of lossy conversion by doing this? Are there any side-effects I should worry about?</p>
  
  <p>Some other details:</p>
  
  <ol>
  <li>I'm using Visual Studio 2015</li>
  <li>My application is compiled using <strong>Use Multi-Byte Character Set</strong></li>
  </ol>