• Type: Task
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator
    • 8

      Besides the fact that this loses the key data, two keys can collapse to the same value with U+FFFD replacements, meaning we lose not just the key but the values.

      mongoexport should fail loudly if it encounters invalid UTF-8 in the output data. The replacement happens in the bson package, which we don’t own, but we do have a bsonutil.MarshalExtJSONWithBSONRoundtripConsistency wrapper that detects when this happens.

      We either need to use that wrapper everywhere or get the driver to add some sort of strict mode to error on invalid UTF-8 from the Server.

      We do allow invalid UTF-8 in mongodump, but this will round-trip completely via mongorestore. Newer Server versions will reject this data.

            Assignee:
            Unassigned
            Reporter:
            Dave Rolsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: