title: How to convert Unicode string into a utf-8 or utf-16 string?
body: <p>How to convert Unicode string into a utf-8 or utf-16 string?
  My VS2005 project is using Unicode char set, while sqlite in cpp provide </p>
  
  <pre><code>int sqlite3_open(
    const char *filename,   /* Database filename (UTF-8) */
    sqlite3 **ppDb          /* OUT: SQLite db handle */
  );
  int sqlite3_open16(
    const void *filename,   /* Database filename (UTF-16) */
    sqlite3 **ppDb          /* OUT: SQLite db handle */
  );
  </code></pre>
  
  <p>for opening a folder.
  How can I convert string, CString, or wstring into UTF-8 or UTF-16 charset?</p>
  
  <p>Thanks very much!</p>