mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Encode surrogates in UTF-8 even for a wide Py_UNICODE.
Implement sys.maxunicode. Explicitly wrap around upper/lower computations for wide Py_UNICODE. When decoding large characters with UTF-8, represent expected test results using the \U notation.
This commit is contained in:
parent
236d8b7974
commit
ce9b5a55e1
5 changed files with 47 additions and 16 deletions
|
@ -274,6 +274,9 @@ extern DL_IMPORT(int) PyUnicode_GetSize(
|
|||
PyObject *unicode /* Unicode object */
|
||||
);
|
||||
|
||||
/* Get the maximum ordinal for a Unicode character. */
|
||||
extern DL_IMPORT(Py_UNICODE) PyUnicode_GetMax(void);
|
||||
|
||||
/* Resize an already allocated Unicode object to the new size length.
|
||||
|
||||
*unicode is modified to point to the new (resized) object and 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue