Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45a4fef commit f192463Copy full SHA for f192463
1 file changed
library/io.po
@@ -1384,6 +1384,12 @@ msgid ""
1384
"``\\N{...}`` escape sequences) can be used. Any other error handling name "
1385
"that has been registered with :func:`codecs.register_error` is also valid."
1386
msgstr ""
1387
+"*errors* 是一个可选的字符串,它指明编码格式和编码格式错误的处理方式。 传入 ``'strict'`` 将在出现编码格式错误时引发 "
1388
+":exc:`ValueError` (默认值 ``None`` 具有相同的效果),传入 ``'ignore'`` 将忽略错误。 "
1389
+"(请注意忽略编码格式错误会导致数据丢失。) ``'replace'`` 会在出现错误数据时插入一个替换标记 (例如 ``'?'``)。 "
1390
+"``'backslashreplace'`` 将把错误数据替换为一个反斜杠转义序列。 在写入时,还可以使用 "
1391
+"``'xmlcharrefreplace'`` (替换为适当的 XML 字符引用) 或 ``'namereplace'`` (替换为 "
1392
+"``\\N{...}`` 转义序列)。 任何其他通过 :func:`codecs.register_error` 注册的错误处理方式名称也可以被接受。"
1393
1394
#: ../../library/io.rst:894
1395
msgid ""
0 commit comments