@@ -1422,38 +1422,10 @@ are always available. They are listed here in alphabetical order.
1422
1422
1423
1423
*errors * is an optional string that specifies how encoding and decoding
1424
1424
errors are to be handled—this cannot be used in binary mode.
1425
- A variety of standard error handlers are available
1426
- (listed under :ref: `error-handlers `), though any
1427
- error handling name that has been registered with
1425
+ A variety of standard error handlers are available,
1426
+ though any error handling name that has been registered with
1428
1427
:func: `codecs.register_error ` is also valid. The standard names
1429
- include:
1430
-
1431
- * ``'strict' `` to raise a :exc: `ValueError ` exception if there is
1432
- an encoding error. The default value of ``None `` has the same
1433
- effect.
1434
-
1435
- * ``'ignore' `` ignores errors. Note that ignoring encoding errors
1436
- can lead to data loss.
1437
-
1438
- * ``'replace' `` causes a replacement marker (such as ``'?' ``) to be inserted
1439
- where there is malformed data.
1440
-
1441
- * ``'surrogateescape' `` will represent any incorrect bytes as low
1442
- surrogate code units ranging from U+DC80 to U+DCFF.
1443
- These surrogate code units will then be turned back into
1444
- the same bytes when the ``surrogateescape `` error handler is used
1445
- when writing data. This is useful for processing files in an
1446
- unknown encoding.
1447
-
1448
- * ``'xmlcharrefreplace' `` is only supported when writing to a file.
1449
- Characters not supported by the encoding are replaced with the
1450
- appropriate XML character reference :samp: `&#{ nnn } ; `.
1451
-
1452
- * ``'backslashreplace' `` replaces malformed data by Python's backslashed
1453
- escape sequences.
1454
-
1455
- * ``'namereplace' `` (also only supported when writing)
1456
- replaces unsupported characters with ``\N{...} `` escape sequences.
1428
+ can be found in :ref: `error-handlers `.
1457
1429
1458
1430
.. index ::
1459
1431
single: universal newlines; open() built-in function
0 commit comments