-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:MAC OS Version 10.13.6
tested on Compass 1.17.0 in response to case https://support.mongodb.com/case/00561194
Initially was unable to reproduce by adding new line character(s) by editing document via Compass. Later found out that Compass escapes `/` (This may work as intended but was not clear in testing).
Then tested in shell
Please note
- extra leading space in `b` and `fb`
- these results differ from customer's example (at this time customer's Compass version is unknown)
MongoDB Enterprise M0-shard-0:PRIMARY> nl =String.fromCharCode(10) MongoDB Enterprise M0-shard-0:PRIMARY> a = "Nature " + nl + " is " + nl + " Great " Nature is Great MongoDB Enterprise M0-shard-0:PRIMARY> b = " Nature \n is \n great" Nature is great MongoDB Enterprise M0-shard-0:PRIMARY> db.items.insert({fa: a, fb : b}) WriteResult({ "nInserted" : 1 }) MongoDB Enterprise M0-shard-0:PRIMARY> db.items.find() ... { "_id" : ObjectId("5cae2effa19c363c59af54c1"), "fa" : "Nature \n is \n Great ", "fb" : " Nature \n is \n great" }
**EXPORT RESULTS**
- CSV in TextEdit
_id,text,owner_id ... ObjectId("5cae2effa19c363c59af54c1"),,
- JSON in TextEdit
... {"_id":{"$oid":"5cae2effa19c363c59af54c1"},"fa":"Nature \n is \n Great ","fb":" Nature \n is \n great"}
And just for completeness' sake, here is the document I edited in compass
Please note, adding `\` or `\n` or `\r \n` via compass edit all exported fine into CSV
- Shell View
{ "_id" : ObjectId("5cad35b8d72322ff983bc072"), "text" : "Natures Bounty Pure Favorite Sweepstakes \\r \\n sdfsdf \\r \\n sdfsdf \\r \\n sdff", "owner_id" : "5cad35af6926e7b8bb4c998a" }
- CSV Export shown in TextEdit
_id,text,owner_id ... ObjectId("5cad35b8d72322ff983bc072"),Natures Bounty Pure Favorite Sweepstakes \r \n sdfsdf \r \n sdfsdf \r \n sdff,5cad35af6926e7b8bb4c998a
- tested by
-
COMPASS-3824 Test behavior of new feature in relation to the bugs linked in this ticket
- Closed
- links to