title: sqlite3 unicode support in c++
body: <pre><code>std::ostringstream oss;
  std::string s="תז";
  oss &lt;&lt; "insert into t values(" &lt;&lt; s &lt;&lt; ");"
  this-&gt;sql = oss.str();    
  rc = sqlite3_exec(c,this-&gt;sql.c_str(), callback, 0 , &amp;zErrMsg);
  </code></pre>
  
  <p><code>this-&gt;sql.c_str()</code> contains UTF-8 characters, after the execution of this line, if the data that inserted was unicode, this data in the database will be corrupted (one byte for each character instead of two bytes).
  How to add Unicode support?</p>
  
  <p>I want to write <code>תז</code> to the database, the bytes written to the database are: <code>fa e6</code> what needs to be written: <code>d7 aa d7 96</code></p>
  
  <p>Thanks.</p>