mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
SF bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain
about illegal code points. The codec now supports PEP 293 style error handlers. (This is a variant of the Nik Haldimann's patch that detects truncated data)
This commit is contained in:
parent
523c9f0709
commit
a47d1c08d0
6 changed files with 173 additions and 5 deletions
|
@ -797,6 +797,16 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeRawUnicodeEscape(
|
|||
int length /* Number of Py_UNICODE chars to encode */
|
||||
);
|
||||
|
||||
/* --- Unicode Internal Codec ---------------------------------------------
|
||||
|
||||
Only for internal use in _codecsmodule.c */
|
||||
|
||||
PyObject *_PyUnicode_DecodeUnicodeInternal(
|
||||
const char *string,
|
||||
int length,
|
||||
const char *errors
|
||||
);
|
||||
|
||||
/* --- Latin-1 Codecs -----------------------------------------------------
|
||||
|
||||
Note: Latin-1 corresponds to the first 256 Unicode ordinals.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue