mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Issue #850997: mbcs encoding (Windows only) handles errors argument: strict
mode raises unicode errors. The encoder only supports "strict" and "replace" error handlers, the decoder only supports "strict" and "ignore" error handlers.
This commit is contained in:
parent
79ee19f3db
commit
554f3f0081
5 changed files with 149 additions and 45 deletions
|
@ -1223,6 +1223,23 @@ functions can be used directly if desired.
|
|||
Convert a label to Unicode, as specified in :rfc:`3490`.
|
||||
|
||||
|
||||
:mod:`encodings.mbcs` --- Windows ANSI codepage
|
||||
-----------------------------------------------
|
||||
|
||||
.. module:: encodings.mbcs
|
||||
:synopsis: Windows ANSI codepage
|
||||
|
||||
Encode operand according to the ANSI codepage (CP_ACP). This codec only
|
||||
supports ``'strict'`` and ``'replace'`` error handlers to encode, and
|
||||
``'strict'`` and ``'ignore'`` error handlers to decode.
|
||||
|
||||
Availability: Windows only.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used
|
||||
to encode, and ``'ignore'`` to decode.
|
||||
|
||||
|
||||
:mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature
|
||||
-------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue