Skip to content

Commit

Permalink
DOCSP-23996 Add enableUtf8Validation Connectionstring Option (#576)
Browse files Browse the repository at this point in the history
* DOCSP-23996 Add enableUtf8Validation Connectionstring Option

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* *

* Apply suggestions from code review

Co-authored-by: Sarah Olson <[email protected]>

* *

---------

Co-authored-by: Sarah Olson <[email protected]>
  • Loading branch information
ianf-mongodb and sarah-olson-mongodb authored Jan 19, 2024
1 parent 6d7244d commit e8eaace
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
30 changes: 30 additions & 0 deletions source/includes/fact-non-utf8-data.rst
Original file line number Diff line number Diff line change
@@ -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 <advanced-connection-tab>` by
selecting :guilabel:`enableUtf8Validation` and entering
``false``.
7 changes: 7 additions & 0 deletions source/query/filter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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?
--------------------------------------------------------------

Expand Down

0 comments on commit e8eaace

Please sign in to comment.