Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-327

Replication of document results in invalid_json error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 8.10

      Description

      While replicating a document containing UTf8 characters replication fails with invalid_json errors in the receiving couch instance.
      The test below will cause the replication error.

      couchTests.utf8_replication = function(debug) {
      if (debug) debugger;
      var host = CouchDB.host;
      var texts = [];
      var dbPairs = [

      {source:"http://"+host+"/test_suite_db_a", target:"http://"+host+"/test_suite_db_b"}

      ]
      var dbA = new CouchDB("test_suite_db_a");
      var dbB = new CouchDB("test_suite_db_b");
      var numDocs = 10;
      var xhr;
      for (var testPair = 0; testPair < dbPairs.length; testPair++) {
      var A = dbPairs[testPair].source
      var B = dbPairs[testPair].target

      dbA.deleteDb();
      dbA.createDb();
      dbB.deleteDb();
      dbB.createDb();

      text = "􀂀 Fakain: 􀂀 Faktor produksi yang digunakan hanya tenaga kerja saja. 􀂀 Kualitas ba";
      dbA.save({_id:"1", text:text})

      var result = CouchDB.replicate(A, B);

      }
      };

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kocolosk Adam Kocoloski
                Reporter:
                greggmc Matthew Gregg
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: