title: Windows API: ANSI and Wide-Character Strings -- Is it UTF8 or ASCII? UTF-16 or UCS-2 LE?
body: <p>I'm not quite pro with encodings, but here's what I think I know (though it may be wrong):</p>
  
  <ol>
  <li>ASCII is a 7-bit, fixed-length encoding, with the characters you can find in ASCII charts.</li>
  <li>UTF8 is an 8-bit, variable-length encoding. All characters can be written in UTF8.</li>
  <li>UCS-2 LE/BE are fixed-length, 16-bit encodings that support most common characters.</li>
  <li>UTF-16 is a 16-bit, variable-length encoding. All characters can be written in UTF16.</li>
  </ol>
  
  <p>Are those above all correct?</p>
  
  <p>Now, for the questions:</p>
  
  <ol>
  <li>Do the Windows "A" functions (like <code>SetWindowTextA</code>) take in ASCII strings? Or "multi-byte strings" (more questions on this below)?</li>
  <li>Do the Windows "W" functions take in UTF-16 strings or UCS-2 strings? I thought they take in UCS-2, but the names confuse me.</li>
  <li>In <a href="http://msdn.microsoft.com/en-us/library/dd374130%28v=vs.85%29.aspx" rel="noreferrer">WideCharToMultiByte</a>, Microsoft uses the word "wide-character string" to mean UTF-16. In that context, then what is considered a "multi-byte string"? UTF-8?</li>
  <li>Is <code>LPWSTR</code> a "wide-character string"? I would say it is, but then, wouldn't that mean it's UTF-16? And wouldn't that mean that it could be used to display, say, 4-byte characters? If not, then... is displaying 4-byte characters impossible? (Windows doesn't seem to have APIs for those.)</li>
  <li>Is the functionality of <code>WideCharToMultiByte</code> a superset of that of <code>wcstombs</code>, and do they both work on the same type of string? Or does one, say, work on UTF-16 while the other works on UCS-2?</li>
  <li>Are file paths in UTF-16 or UCS-2? I know Windows treats it as an "opaque array of characters" from Microsoft's documentation, but per the C standard for functions like <code>fwprintf</code>, is there any standardized encoding?</li>
  <li>What is "ANSI" encoding? Is that even a correct term? And how does it relate to ASCII?</li>
  <li>(I had more questions, but this is enough... I forgot some of them anyway...)</li>
  </ol>
  
  <p>These are a lot of questions, so any links to explanations about how all these connect (aside from reading the Unicode standard, which won't help with the Windows API anyway) would also be greatly appreciated.</p>
  
  <p>Thank you!</p>