mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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
|
|
@ -265,7 +265,7 @@ except ImportError:
|
|||
pass
|
||||
else:
|
||||
if _os.name in ("nt", "ce"):
|
||||
set_conversion_mode("mbcs", "ignore")
|
||||
set_conversion_mode("mbcs", "strict")
|
||||
else:
|
||||
set_conversion_mode("ascii", "strict")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue