We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b93f0e commit 4eed282Copy full SHA for 4eed282
Doc/c-api/unicode.rst
@@ -421,6 +421,12 @@ APIs:
421
:c:func:`PyUnicode_KIND`). The *buffer* must point to an array of *size*
422
units of 1, 2 or 4 bytes per character, as given by the kind.
423
424
+ If necessary, the input *buffer* is copied and transformed into the
425
+ canonical representation. For example, if the *buffer* is a UCS4 string
426
+ (:c:macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in
427
+ the UCS1 range, it will be transformed into UCS1
428
+ (:c:macro:`PyUnicode_1BYTE_KIND`).
429
+
430
.. versionadded:: 3.3
431
432
0 commit comments