-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
Affects Version/s: 1.27.1, 1.34.2
-
Component/s: CRUD, Document Validation, Import/Export
-
None
-
Environment:Windows for sure, but I think all.
-
2
-
Needed
-
-
Iteration Fish, Iteration Grouper
Problem Statement/Rationale
Compass will not display any results that would include a document containing an invalid UTF-8 string, and in place of the results displays the error "Invalid UTF-8 string in BSON document". This is also true of exporting: Compass will not allow a set of documents to be exported if one of them contains an invalid UTF-8 string (provides the same error).
This is in contrast to Compass v1.26.1 which did display/export these documents, but substituted the replacement character � for any invalid bytes.
Steps to Reproduce
1. Create a document in MongoDB that contains a string field with invalid UTF-8 bytes. (I do not know how to actually perform this step but it seems to be possible).
3. View the document in Compass, and also attempt to export the collection that contains this document.
Expected Results
I expect the behavior to be the same as it is in v1.26.1. The document can be viewed in Compass, with invalid chars replaced by �. The document can be exported using the "Export Collection" tool.
Actual Results
The document is not viewable in Compass and displays the error "Invalid UTF-8 string in BSON document". Clicking "Export Collection" (even if not viewing the document at the time, but exporting the full collection) and saving to a file gives the same error: "Invalid UTF-8 string in BSON document".
Additional Notes
The errors occurred on both v1.27.1 and v1.28.1.
- related to
-
NODE-3784 Expose disabling utf-8 validation option for users
- Closed