diff --git a/source/includes/fact-non-utf8-data.rst b/source/includes/fact-non-utf8-data.rst new file mode 100644 index 000000000..3f261d5db --- /dev/null +++ b/source/includes/fact-non-utf8-data.rst @@ -0,0 +1,30 @@ +If you attempt to query or export data with invalid UTF8 characters +the following error message displays: + +.. code-block:: none + :copyable: false + + Invalid UTF-8 string in BSON document. + +To query or export this data, disable UTF8 validation by setting +the ``enableUtf8Validation`` URI option to ``false``. + +.. warning:: + + **Editing data** with ``enableUtf8Validation=false`` can result in + loss of data. This approach is a temporary workaround to + query or export data only. + +The following URI disables UTF8 validation: + +.. code-block:: javascript + + mongodb://localhost:27017/?enableUtf8Validation=false + + +.. note:: + + You can also disable this option in the + :ref:`Advanced Connection Options ` by + selecting :guilabel:`enableUtf8Validation` and entering + ``false``. diff --git a/source/query/filter.txt b/source/query/filter.txt index d3f3da422..550386618 100644 --- a/source/query/filter.txt +++ b/source/query/filter.txt @@ -375,6 +375,13 @@ Clear the Query .. include:: /includes/clear-query.rst +.. _compass-query-invalid-utf8-data: + +Query Collections with Invalid UTF8 Data +---------------------------------------- + +.. include:: /includes/fact-non-utf8-data.rst + How Does the Compass Query Compare to MongoDB and SQL Queries? --------------------------------------------------------------