• Home
  • Raw
  • Download

Lines Matching full:unicode

5 Unicode Objects and Codecs
10 Unicode Objects
14 Unicode Type
17 These are the basic Unicode object types used for the Unicode implementation in
24 basis for holding Unicode ordinals. Python's default builds use a 16-bit type
25 for :c:type:`Py_UNICODE` and store Unicode values internally as UCS2. It is also
28 :c:type:`Py_UNICODE` and store Unicode data internally as UCS4. On platforms
30 Unicode build variant, :c:type:`Py_UNICODE` is a typedef alias for
41 This subtype of :c:type:`PyObject` represents a Python Unicode object.
46 This instance of :c:type:`PyTypeObject` represents the Python Unicode type. It
47 is exposed to Python code as ``unicode`` and ``types.UnicodeType``.
50 access internal read-only data of Unicode objects:
55 Return true if the object *o* is a Unicode object or an instance of a Unicode
64 Return true if the object *o* is a Unicode object, but not an instance of a
109 Unicode Character Properties
112 Unicode provides many different character properties. The most often needed ones
205 To create Unicode objects and access their basic sequence properties, use these
211 Create a Unicode object from the Py_UNICODE buffer *u* of the given size. *u*
215 Therefore, modification of the resulting Unicode object is only allowed when *u*
225 Create a Unicode object from the char buffer *u*. The bytes will be interpreted
230 the resulting Unicode object is only allowed when *u* is *NULL*.
237 Create a Unicode object from a UTF-8 encoded null-terminated char buffer
246 arguments, calculate the size of the resulting Python unicode string and return
300 | :attr:`%U` | PyObject\* | A unicode object. |
302 | :attr:`%V` | PyObject\*, char \* | A unicode object (which may be |
330 .. c:function:: Py_UNICODE* PyUnicode_AsUnicode(PyObject *unicode)
332 Return a read-only pointer to the Unicode object's internal
333 :c:type:`Py_UNICODE` buffer, *NULL* if *unicode* is not a Unicode object.
339 .. c:function:: Py_ssize_t PyUnicode_GetSize(PyObject *unicode)
341 Return the length of the Unicode object.
350 Coerce an encoded object *obj* to a Unicode object and return a reference with
358 All other objects, including Unicode objects, cause a :exc:`TypeError` to be
368 throughout the interpreter whenever coercion to Unicode is needed.
383 Create a Unicode object from the :c:type:`wchar_t` buffer *w* of the given *size*.
391 .. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyUnicodeObject *unicode, wchar_t *w, Py_ssize_t si…
393 Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*. At most
418 have the same semantics as the ones of the built-in :func:`unicode` Unicode
443 Create a Unicode object by decoding *size* bytes of the encoded string *s*.
445 in the :func:`unicode` built-in function. The codec to be used is looked up
458 of the same name in the Unicode :meth:`~unicode.encode` method. The codec
467 .. c:function:: PyObject* PyUnicode_AsEncodedString(PyObject *unicode, const char *encoding, const …
469 Encode a Unicode object and return the result as Python string object.
471 in the Unicode :meth:`encode` method. The codec to be used is looked up using
484 Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string
516 .. c:function:: PyObject* PyUnicode_AsUTF8String(PyObject *unicode)
518 Encode a Unicode object using UTF-8 and return the result as Python string
532 corresponding Unicode object. *errors* (if non-*NULL*) defines the error
544 not copied into the resulting Unicode string. If ``*byteorder`` is ``-1`` or
572 Return a Python bytes object holding the UTF-32 encoded value of the Unicode
579 If byteorder is ``0``, the output string will always start with the Unicode BOM
590 .. c:function:: PyObject* PyUnicode_AsUTF32String(PyObject *unicode)
608 corresponding Unicode object. *errors* (if non-*NULL*) defines the error
620 not copied into the resulting Unicode string. If ``*byteorder`` is ``-1`` or
654 Return a Python string object holding the UTF-16 encoded value of the Unicode
661 If byteorder is ``0``, the output string will always start with the Unicode BOM
675 .. c:function:: PyObject* PyUnicode_AsUTF16String(PyObject *unicode)
690 Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string
714 Unicode-Escape Codecs
717 These are the "Unicode Escape" codec APIs:
722 Create a Unicode object by decoding *size* bytes of the Unicode-Escape encoded
732 Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-Escape and
741 .. c:function:: PyObject* PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
743 Encode a Unicode object using Unicode-Escape and return the result as Python
748 Raw-Unicode-Escape Codecs
751 These are the "Raw Unicode Escape" codec APIs:
756 Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape
766 Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-Escape
775 .. c:function:: PyObject* PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
777 Encode a Unicode object using Raw-Unicode-Escape and return the result as
785 These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 Unicode
791 Create a Unicode object by decoding *size* bytes of the Latin-1 encoded string
809 .. c:function:: PyObject* PyUnicode_AsLatin1String(PyObject *unicode)
811 Encode a Unicode object using Latin-1 and return the result as Python string
825 Create a Unicode object by decoding *size* bytes of the ASCII encoded string
843 .. c:function:: PyObject* PyUnicode_AsASCIIString(PyObject *unicode)
845 Encode a Unicode object using ASCII and return the result as Python string
858 Decoding mappings must map single string characters to single Unicode
859 characters, integers (which are then interpreted as Unicode ordinals) or ``None``
862 Encoding mappings must map single Unicode characters to single string
870 meaning that its ordinal value will be interpreted as Unicode or Latin-1 ordinal
878 Create a Unicode object by decoding *size* bytes of the encoded string *s* using
881 dictionary mapping byte or a unicode string, which is treated as a lookup table.
886 Allowed unicode string as mapping argument.
904 .. c:function:: PyObject* PyUnicode_AsCharmapString(PyObject *unicode, PyObject *mapping)
906 Encode a Unicode object using the given *mapping* object and return the result
910 The following codec API is special in that maps Unicode to Unicode.
916 character mapping *table* to it and return the resulting Unicode object. Return
919 The *mapping* table must map Unicode ordinal integers to Unicode ordinal
942 Create a Unicode object by decoding *size* bytes of the MBCS encoded string *s*.
970 .. c:function:: PyObject* PyUnicode_AsMBCSString(PyObject *unicode)
972 Encode a Unicode object using MBCS and return the result as Python string
985 The following APIs are capable of handling Unicode objects and strings on input
986 (we refer to them as strings in the descriptions) and return Unicode objects or
994 Concat two strings giving a new Unicode string.
999 Split a string giving a list of Unicode strings. If *sep* is *NULL*, splitting
1011 Split a Unicode string at line breaks, returning a list of Unicode strings.
1019 resulting Unicode object.
1021 The mapping table must map Unicode ordinal integers to Unicode ordinal integers
1035 Unicode string.
1078 return the resulting Unicode object. *maxcount* == ``-1`` means replace all
1094 Rich compare two unicode strings and return one of the following:
1101 :exc:`UnicodeWarning` in case the conversion of the arguments to Unicode fails
1119 *element* has to coerce to a one element Unicode string. ``-1`` is returned if