title: sqlite not saving french accents like à as $agrave
body: <p>When i will save into my database "C&#39;est tout &agrave; fait juste.", sqlite will remove the &amp; from &amp;agrave, becouse it can't maybe handle utf-8.</p>
  
  <p>var sql += "INSERT INTO Test(TestId,Text) Values(1, "C&#39;est tout &agrave; fait juste.");</p>
  
  <p>I tried for every insert to replace the $agrave with à, but I think there will be a better solution.</p>
  
  <p>Is there a better way to solve this?</p>
  
  <p>Thanks for any help...</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is my code to create my sqlite database:</p>
  
  <pre><code>  function initDb($cordovaSQLite, logService) {
      var defcorrect = $.Deferred();
      try {
  
          logger = logService;
  
          db = window.sqlitePlugin.openDatabase({ name: "xxx.db", location: 0 }, successCB, errorCB);
  
          $cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS Card(CardId UNIQUEIDENTIFIER PRIMARY KEY, CardSetId UNIQUEIDENTIFIER NOT NULL,  FrontText NVARCHAR(4000) NOT NULL, BackText NVARCHAR(4000) NULL, ControlType INT NOT NULL, CardLevel INT NOT NULL, IsDirty bit NOT NULL, ChangedAt INT NOT NULL, Active bit default 'true')").catch(function (err) {
              logService.writeAppError("00000000-0000-0000-0000-000000000000", "Could not init Table Card: ErrorNo: " + startGUIDLog + " ErrorMessage: " + err.message);
              window.location = "#/error/" + startGUIDLog;
          });
  
          $cordovaSQLite.execute(db, "CREATE UNIQUE INDEX IF NOT EXISTS Card_Index on Card (CardId)").catch(function (err) {
              logService.writeAppError("00000000-0000-0000-0000-000000000000", "Could not init INDEX Card_Index on Card: ErrorNo: " + startGUIDLog + " ErrorMessage: " + err.message);
              window.location = "#/error/" + startGUIDLog;
          });
  
          defcorrect.resolve(db);
  
      } catch (err) {
          logService.writeAppError("00000000-0000-0000-0000-000000000000", "Could not init Database: ErrorNo: " + startGUIDLog + " ErrorMessage: " + err.message);
          window.location = "#/error/" + startGUIDLog;
      }
      return defcorrect.promise();
  }
  </code></pre>
  
  <p>And with this code I insert the data</p>
  
  <pre><code>     function saveCard(cardList, userId, db) {
          var defcorrect = $.Deferred();
          truncateTable("Card", db, userId).done(function () {
              if (cardList.length !== 0) {
                  var sql = "";
                  cardList.forEach(function (card) {
                      sql += "INSERT INTO Card(CardId,CardSetId,FrontText,BackText,ControlType,CardLevel,IsDirty,ChangedAt,Active) VALUES (" + JSON.stringify(card.CardId) + "," + JSON.stringify(card.CardSetId) + "," + JSON.stringify(Card.FrontText) + "," + JSON.stringify(Card.BackText) + "," + card.ControlType + ", " + card.CardLevel + ",'" + card.IsDirty + "'," + card.ChangedAt + ",'" + card.Active + "');";
                  });
  
                  var successFn = function (count) {
                      logService.writeAppInfo(userId, "Sync Save Card Successfully imported " + count + " SQL statements to DB");
                      defcorrect.resolve();
                  };
                  var errorFn = function (error) {
                      logService.writeAppError(userId, "Sync Save Card Error: " + error);
                      $('#statusOverview').hide();
                      $('#syncError').show();
                  };
                  var progressFn = function (current, total) {
                      $("#statusText").text("Importiere " + current + "/" + total + " Karten");
                  };
                  cordova.plugins.sqlitePorter.importSqlToDb(db, sql, {
                      successFn: successFn,
                      errorFn: errorFn,
                      progressFn: progressFn,
                      batchInsertSize: 500
                  });
              } else {
                  defcorrect.resolve();
              }
          });
  
          return defcorrect.promise();
      }
  </code></pre>
  
  <p>In the debug mode I can see, that the data comes in the right way like "C&#39;est tout &agrave; fait juste." and after insert when i read out this data it comes like this: "C&#39;est toutagrave; fait juste."</p>