mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Build with --disable-unicode again. Fixes #1158607.
Will backport to 2.4.
This commit is contained in:
parent
b60ae99601
commit
e2713becd8
7 changed files with 41 additions and 14 deletions
|
@ -720,11 +720,19 @@ def make_encoding_map(decoding_map):
|
|||
|
||||
### error handlers
|
||||
|
||||
strict_errors = lookup_error("strict")
|
||||
ignore_errors = lookup_error("ignore")
|
||||
replace_errors = lookup_error("replace")
|
||||
xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace")
|
||||
backslashreplace_errors = lookup_error("backslashreplace")
|
||||
try:
|
||||
strict_errors = lookup_error("strict")
|
||||
ignore_errors = lookup_error("ignore")
|
||||
replace_errors = lookup_error("replace")
|
||||
xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace")
|
||||
backslashreplace_errors = lookup_error("backslashreplace")
|
||||
except LookupError:
|
||||
# In --disable-unicode builds, these error handler are missing
|
||||
strict_errors = None
|
||||
ignore_errors = None
|
||||
replace_errors = None
|
||||
xmlcharrefreplace_errors = None
|
||||
backslashreplace_errors = None
|
||||
|
||||
# Tell modulefinder that using codecs probably needs the encodings
|
||||
# package
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue