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:
Martin v. Löwis 2001-06-27 06:28:56 +00:00
parent 236d8b7974
commit ce9b5a55e1
5 changed files with 47 additions and 16 deletions

View file

@ -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