Skip to content

Commit bd2e165

Browse files
ianf-mongodbChris Cho
authored andcommitted
DOCSP-23996 Add enableUtf8Validation URI Option (#841)
* DOCSP-23996 Add enableUtf8Validation URI Option (cherry picked from commit e4537ac)
1 parent 57b73f6 commit bd2e165

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

source/fundamentals/connection/connection-options.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parameters of the connection URI to specify the behavior of the client.
1010

1111
.. list-table::
1212
:header-rows: 1
13-
:widths: 1 1 1 1
13+
:widths: 30 20 10 40
1414

1515
* - Name
1616
- Accepted Values
@@ -66,6 +66,28 @@ parameters of the connection URI to specify the behavior of the client.
6666
- Specifies whether to force dispatch **all** operations to the host
6767
specified in the connection URI.
6868

69+
* - **enableUtf8Validation**
70+
- boolean
71+
- ``true``
72+
-
73+
Specifying ``true`` enables UTF-8 validation for the
74+
connection. MongoDB throws an error when
75+
it attempts to serialize string data that contains invalid
76+
UTF-8 characters to BSON. This applies to both document keys and
77+
document values, this validation adds processing overhead.
78+
79+
Specifying ``false`` disables UTF-8 validation for the
80+
connection. MongoDB does not throw errors when
81+
data contains invalid UTF-8 data. If you disable validation,
82+
your application avoids the validation processing overhead.
83+
**Editing data** while validation is disabled
84+
can result in loss of data. Disabling UTF-8 validation is a
85+
temporary workaround to query or export data only.
86+
87+
You can also set UTF-8 validation in your :ref:`Node.js code
88+
<nodejs-utf-8-validation>`. To learn more about UTF-8 characters,
89+
see `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ on Wikipedia.
90+
6991
* - **heartbeatFrequencyMS**
7092
- integer greater than or equal to 500
7193
- ``null``

0 commit comments

Comments
 (0)